This chapter describes functions for creating and manipulating permutations. A permutation @math{p} is represented by an array of @math{n} integers in the range 0 .. @math{n-1}, where each value @math{p_i} occurs once and only once. The application of a permutation @math{p} to a vector @math{v} yields a new vector @math{v'} where @math{v'_i = v_{p_i}}. For example, the array @math{(0,1,3,2)} represents a permutation which exchanges the last two elements of a four element vector. The corresponding identity permutation is @math{(0,1,2,3)}.

Note that the permutations produced by the linear algebra routines correspond to the exchange of matrix columns, and so should be considered as applying to row-vectors in the form @math{v' = v P} rather than column-vectors, when permuting the elements of a vector.

The functions described in this chapter are defined in the header file
``gsl_permutation.h'`.

Go to the first, previous, next, last section, table of contents.