## File: Applying-Permutations.html

package info (click to toggle)
gsl-ref-html 2.3-1
• area: non-free
• in suites: bullseye, buster, sid
• size: 6,876 kB
• ctags: 4,574
• sloc: makefile: 35
 file content (133 lines) | stat: -rw-r--r-- 7,518 bytes parent folder | download
 `123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133` `````` GNU Scientific Library – Reference Manual: Applying Permutations

9.6 Applying Permutations

Function: int gsl_permute (const size_t * p, double * data, size_t stride, size_t n)

This function applies the permutation p to the array data of size n with stride stride.

Function: int gsl_permute_inverse (const size_t * p, double * data, size_t stride, size_t n)

This function applies the inverse of the permutation p to the array data of size n with stride stride.

Function: int gsl_permute_vector (const gsl_permutation * p, gsl_vector * v)

This function applies the permutation p to the elements of the vector v, considered as a row-vector acted on by a permutation matrix from the right, v' = v P. The j-th column of the permutation matrix P is given by the p_j-th column of the identity matrix. The permutation p and the vector v must have the same length.

Function: int gsl_permute_vector_inverse (const gsl_permutation * p, gsl_vector * v)

This function applies the inverse of the permutation p to the elements of the vector v, considered as a row-vector acted on by an inverse permutation matrix from the right, v' = v P^T. Note that for permutation matrices the inverse is the same as the transpose. The j-th column of the permutation matrix P is given by the p_j-th column of the identity matrix. The permutation p and the vector v must have the same length.

Function: int gsl_permute_matrix (const gsl_permutation * p, gsl_matrix * A)

This function applies the permutation p to the matrix A from the right, A' = A P. The j-th column of the permutation matrix P is given by the p_j-th column of the identity matrix. This effectively permutes the columns of A according to the permutation p, and so the number of columns of A must equal the size of the permutation p.

Function: int gsl_permutation_mul (gsl_permutation * p, const gsl_permutation * pa, const gsl_permutation * pb)

This function combines the two permutations pa and pb into a single permutation p, where p = pa * pb. The permutation p is equivalent to applying pb first and then pa.

``````