#include <combinations.hpp>
◆ combination()
tu::combination::combination |
( |
size_t |
n, |
|
|
size_t |
k |
|
) |
| |
|
inline |
Init with (1, ..., 1, 0, ..., 0)
◆ is_last()
bool tu::combination::is_last |
( |
| ) |
const |
|
inline |
Is this the last, i.e. (0, ..., 0, 1, ..., 1) ? Time: O(1)
◆ k()
size_t tu::combination::k |
( |
| ) |
const |
|
inline |
◆ n()
size_t tu::combination::n |
( |
| ) |
const |
|
inline |
◆ next()
void tu::combination::next |
( |
| ) |
|
|
inline |
Compute the next combination. Time: O(k)
◆ operator[]()
size_t tu::combination::operator[] |
( |
size_t |
index | ) |
const |
|
inline |
Where is the index's 1 entry?
◆ _data
std::vector<size_t> tu::combination::_data |
|
protected |
◆ _size
size_t tu::combination::_size |
|
protected |
The documentation for this class was generated from the following file: