MT::Permutation Class Reference
#include <array.h>
Inherits MT::Array< uint >.
List of all members.
Detailed Description
A permutation realized as 1-dimensional array of indices.
Definition at line 1963 of file array.h.
Public Member Functions
|
-
void init (uint n)
- sorted permutation of length
n
-
void random (uint n)
- random permutation of length
n
-
void reverse (uint n)
- reverse sorted permutation of lenth
N
|
-
void push (int offset=1)
elem(i)
= elem(i) + offset modulo permutation range N
-
void store ()
- store the current permutation
-
void restore ()
- restore the previously stored permutation
-
void permute (uint i, uint j)
- permute indices of
i
and j
-
void random ()
- randomize permutation
-
template<class T> void permute (Array< T > &a)
- permutes the entries of a according to the current this
-
template<class T> void invpermute (Array< T > &a)
- permutes the entries of a according to the inverse of the current this
The documentation for this class was generated from the following file:
[]