~ubuntu-branches/ubuntu/trusty/gsl-ref-html/trusty

« back to all changes in this revision

Viewing changes to Permutation-allocation.html

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2006-04-12 19:46:32 UTC
  • mfrom: (1.3.1 upstream) (3.1.1 dapper)
  • Revision ID: james.westby@ubuntu.com-20060412194632-c9lodpl075pv9si3
Tags: 1.8-1
* New upstream release 1.8
* As with previous releases, the sources were obtained from the FSF web 
  pages by means of a wget call (c.f. the debian/rules target 'upstream')

* debian/control: Standards-Version increased to 3.6.2
* debian/copyright: Updated FSF address
* debian/rules: Set DH_COMPAT=4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html lang="en">
 
2
<head>
 
3
<title>Permutation allocation - GNU Scientific Library -- Reference Manual</title>
 
4
<meta http-equiv="Content-Type" content="text/html">
 
5
<meta name="description" content="GNU Scientific Library -- Reference Manual">
 
6
<meta name="generator" content="makeinfo 4.8">
 
7
<link title="Top" rel="start" href="index.html#Top">
 
8
<link rel="up" href="Permutations.html#Permutations" title="Permutations">
 
9
<link rel="prev" href="The-Permutation-struct.html#The-Permutation-struct" title="The Permutation struct">
 
10
<link rel="next" href="Accessing-permutation-elements.html#Accessing-permutation-elements" title="Accessing permutation elements">
 
11
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
 
12
<!--
 
13
Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 The GSL Team.
 
14
 
 
15
Permission is granted to copy, distribute and/or modify this document
 
16
under the terms of the GNU Free Documentation License, Version 1.2 or
 
17
any later version published by the Free Software Foundation; with the
 
18
Invariant Sections being ``GNU General Public License'' and ``Free Software
 
19
Needs Free Documentation'', the Front-Cover text being ``A GNU Manual'',
 
20
and with the Back-Cover Text being (a) (see below).  A copy of the
 
21
license is included in the section entitled ``GNU Free Documentation
 
22
License''.
 
23
 
 
24
(a) The Back-Cover Text is: ``You have freedom to copy and modify this
 
25
GNU Manual, like GNU software.''-->
 
26
<meta http-equiv="Content-Style-Type" content="text/css">
 
27
<style type="text/css"><!--
 
28
  pre.display { font-family:inherit }
 
29
  pre.format  { font-family:inherit }
 
30
  pre.smalldisplay { font-family:inherit; font-size:smaller }
 
31
  pre.smallformat  { font-family:inherit; font-size:smaller }
 
32
  pre.smallexample { font-size:smaller }
 
33
  pre.smalllisp    { font-size:smaller }
 
34
  span.sc    { font-variant:small-caps }
 
35
  span.roman { font-family:serif; font-weight:normal; } 
 
36
  span.sansserif { font-family:sans-serif; font-weight:normal; } 
 
37
--></style>
 
38
</head>
 
39
<body>
 
40
<div class="node">
 
41
<p>
 
42
<a name="Permutation-allocation"></a>
 
43
Next:&nbsp;<a rel="next" accesskey="n" href="Accessing-permutation-elements.html#Accessing-permutation-elements">Accessing permutation elements</a>,
 
44
Previous:&nbsp;<a rel="previous" accesskey="p" href="The-Permutation-struct.html#The-Permutation-struct">The Permutation struct</a>,
 
45
Up:&nbsp;<a rel="up" accesskey="u" href="Permutations.html#Permutations">Permutations</a>
 
46
<hr>
 
47
</div>
 
48
 
 
49
<h3 class="section">9.2 Permutation allocation</h3>
 
50
 
 
51
<div class="defun">
 
52
&mdash; Function: gsl_permutation * <b>gsl_permutation_alloc</b> (<var>size_t n</var>)<var><a name="index-gsl_005fpermutation_005falloc-954"></a></var><br>
 
53
<blockquote><p>This function allocates memory for a new permutation of size <var>n</var>. 
 
54
The permutation is not initialized and its elements are undefined.  Use
 
55
the function <code>gsl_permutation_calloc</code> if you want to create a
 
56
permutation which is initialized to the identity. A null pointer is
 
57
returned if insufficient memory is available to create the permutation. 
 
58
</p></blockquote></div>
 
59
 
 
60
<div class="defun">
 
61
&mdash; Function: gsl_permutation * <b>gsl_permutation_calloc</b> (<var>size_t n</var>)<var><a name="index-gsl_005fpermutation_005fcalloc-955"></a></var><br>
 
62
<blockquote><p>This function allocates memory for a new permutation of size <var>n</var> and
 
63
initializes it to the identity. A null pointer is returned if
 
64
insufficient memory is available to create the permutation. 
 
65
</p></blockquote></div>
 
66
 
 
67
<div class="defun">
 
68
&mdash; Function: void <b>gsl_permutation_init</b> (<var>gsl_permutation * p</var>)<var><a name="index-gsl_005fpermutation_005finit-956"></a></var><br>
 
69
<blockquote><p><a name="index-identity-permutation-957"></a>This function initializes the permutation <var>p</var> to the identity, i.e. 
 
70
(0,1,2,<small class="dots">...</small>,n-1). 
 
71
</p></blockquote></div>
 
72
 
 
73
<div class="defun">
 
74
&mdash; Function: void <b>gsl_permutation_free</b> (<var>gsl_permutation * p</var>)<var><a name="index-gsl_005fpermutation_005ffree-958"></a></var><br>
 
75
<blockquote><p>This function frees all the memory used by the permutation <var>p</var>. 
 
76
</p></blockquote></div>
 
77
 
 
78
<div class="defun">
 
79
&mdash; Function: int <b>gsl_permutation_memcpy</b> (<var>gsl_permutation * dest, const gsl_permutation * src</var>)<var><a name="index-gsl_005fpermutation_005fmemcpy-959"></a></var><br>
 
80
<blockquote><p>This function copies the elements of the permutation <var>src</var> into the
 
81
permutation <var>dest</var>.  The two permutations must have the same size. 
 
82
</p></blockquote></div>
 
83
 
 
84
   </body></html>
 
85