KrisLibrary
1.0.0
|
Various permutation utilities. More...
#include <vector>
#include <KrisLibrary/errors.h>
Go to the source code of this file.
Classes | |
class | Permutation |
A class that enumerates permutations. More... | |
Functions | |
void | IdentityPermutation (int v[], int n) |
template<class T > | |
void | RandomlyPermute (T v[], int n) |
void | RandomPermutation (int v[], int n) |
void | IdentityPermutation (std::vector< int > &v) |
template<class T > | |
void | RandomlyPermute (std::vector< T > &v) |
void | RandomPermutation (std::vector< int > &v) |
void | FirstPermutation (int v[], int k, int n) |
void | FirstPermutation (std::vector< int > &v, int n) |
void | LastPermutation (int v[], int k, int n) |
void | LastPermutation (std::vector< int > &v, int n) |
int | NextPermutation (int v[], int k, int n) |
int | NextPermutation (std::vector< int > &v, int n) |
int | PrevPermutation (int v[], int k, int n) |
int | PrevPermutation (std::vector< int > &v, int n) |
Various permutation utilities.
A permutation is defined by an array v (or a vector) of length k, with entries from 0 to n.