The ChainCon Software (Release 0.03)
|
An auxiliary class for iterating all the possible disjoint subsets A and B of integers in [0, ..., range - 1], both of the given length. More...
#include <ssquarescub.h>
Public Member Functions | |
STuples (int length, int range) | |
The only constructor allowed. More... | |
template<class ArrayA , class ArrayB > | |
bool | get (ArrayA &A, ArrayB &B) |
Gets a pair of sets A and B. More... | |
Private Attributes | |
int | _length |
The length of each tuple: A and B. More... | |
int | _range |
The range of numbers that may appear in the tuples. More... | |
Shuffles | sA |
The shuffle iterator that defines the current choice of A. More... | |
bool | nextA |
Remembers if the next choice of A is available. More... | |
std::vector< int > | curA |
The current choice of A. More... | |
std::vector< int > | curAcompl |
The current choice of the complement of A. More... | |
Shuffles | sB |
The shuffle iterator that defines the current choice of B. More... | |
bool | nextB |
Remembers if the next choice of B is available. More... | |
std::vector< int > | curB |
The current choice of B. More... | |
std::vector< int > | curBcompl |
The current choice of the complement of B. More... | |
An auxiliary class for iterating all the possible disjoint subsets A and B of integers in [0, ..., range - 1], both of the given length.
Definition at line 57 of file ssquarescub.h.
|
inline |
|
inline |
|
private |
The length of each tuple: A and B.
Definition at line 71 of file ssquarescub.h.
|
private |
The range of numbers that may appear in the tuples.
The actual numbers are between 0 to _range - 1, inclusive.
Definition at line 75 of file ssquarescub.h.
|
private |
The current choice of A.
Definition at line 84 of file ssquarescub.h.
|
private |
The current choice of the complement of A.
Definition at line 87 of file ssquarescub.h.
|
private |
The current choice of B.
Definition at line 96 of file ssquarescub.h.
|
private |
The current choice of the complement of B.
Definition at line 99 of file ssquarescub.h.
|
private |
Remembers if the next choice of A is available.
Definition at line 81 of file ssquarescub.h.
|
private |
Remembers if the next choice of B is available.
Definition at line 93 of file ssquarescub.h.
|
private |
The shuffle iterator that defines the current choice of A.
Definition at line 78 of file ssquarescub.h.
|
private |
The shuffle iterator that defines the current choice of B.
Definition at line 90 of file ssquarescub.h.