GSL::Permutation class

Class methods

GSL::Permutation.new(n)
GSL::Permutation.alloc(n)
These functions create a new permutation of size n. The permutation is not initialized and its elements are undefined. Use GSL::Permutation.calloc if you want to create a permutation which is initialized to the identity.
GSL::Permutation.calloc(n)
This creates a new permutation of size n and initializes it to the identity.

Methods

GSL::Permutation#init()
This initializes the permutation to the identity, i.e. (0,1,2,...,n-1). 
GSL::Permutation#get(i)
Returns the value of the i-th element of the permutation.
GSL::Permutation#swap(i, j)

back