The ChainCon Software (Release 0.03)
|
An iterator of all the (p,q)-shuffles. More...
#include <shuffles.h>
Public Member Functions | |
Shuffles (int p, int q) | |
The constructor in which the size of the shuffle is given. More... | |
void | rewind () |
Rewinds the counter of the (p,q)-shuffles. More... | |
template<class ArrayP , class ArrayQ > | |
bool | get (ArrayP &alpha, ArrayQ &beta, int &sig) |
Gets a (p,q)-shuffle and its signature. More... | |
Private Attributes | |
int | _p |
The number p of the elements of the first set in the partition. More... | |
int | _pq |
The sum of the numbers of the elements of both sets in the partition: p + q. More... | |
std::vector< int > | _alpha |
A vector of counters that correspond to the first set in the partition. More... | |
An iterator of all the (p,q)-shuffles.
A (p,q)-shuffle (alpha, beta) is a partition of the set {0,...,p+q-1} into two disjoint subsets, such that alpha_1 < ... < alpha_p and beta_1 < ... < beta_q.
Definition at line 51 of file shuffles.h.
|
inline |
The constructor in which the size of the shuffle is given.
Definition at line 82 of file shuffles.h.
References rewind().
|
inline |
|
inline |
Rewinds the counter of the (p,q)-shuffles.
Definition at line 91 of file shuffles.h.
Referenced by get(), and Shuffles().
|
private |
A vector of counters that correspond to the first set in the partition.
Definition at line 76 of file shuffles.h.
|
private |
The number p of the elements of the first set in the partition.
Definition at line 68 of file shuffles.h.
|
private |
The sum of the numbers of the elements of both sets in the partition: p + q.
Definition at line 72 of file shuffles.h.
Referenced by get().