Features
|
Public Member Functions | |
combination_t (combination_element_t n, combination_element_t k) | |
void | initialize () |
combination_element_t | k () const |
combination_element_t | n () const |
bool | next () |
std::vector< combination_element_t > | operator() () const |
Exemplars of this class allow to systematically generate all combinations for n elements and sample size k.
|
inline |
A combination exemplar must be initialized with number of elements and sample size.
n | Number of elements. |
k | Sample size. |
|
inline |
Creates initial valid state for a combination_t exemplar.
|
inline |
Returns sample size.
|
inline |
Returns number of elements.
|
inline |
Tries to generate next combination.
|
inline |
Returns vector that containes the elements of the actual combination.