Helios++
Helios software for LiDAR simulations
|
Permuter of Combinations with No Repetition (CNR) for indices. More...
#include <CNRIndexPermuter.hpp>
Public Member Functions | |
CNRIndexPermuter (T n, T k) | |
Build a permuter for combinations with no repetitions of \(n\) indices selecting \(k\). More... | |
void | start () |
bool | hasNext () |
vector< T > | next () |
vector< T > | get () |
Protected Attributes | |
T | n |
How many indices there are, so it defines a range \([0, n)\). | |
T | k |
How many indices are selected for each permutation. | |
T | max |
How many combinations without repetitions, \({{n}{\choose{k}}\), there exist. | |
T | current |
Index of current permutation. | |
vector< T > | indices |
Current indices permutation. | |
T | stopIndex |
Index to be used as stop condition. | |
Permuter of Combinations with No Repetition (CNR) for indices.
T | Must be an integer type (int, long, size_t, ...) because it is going to be used to represent an index |
SurfaceInspector::maths::permuters::CNRIndexPermuter< T >::CNRIndexPermuter | ( | T | n, |
T | k | ||
) |
Build a permuter for combinations with no repetitions of \(n\) indices selecting \(k\).
n | How many indices, so they will range in interval \([0, n)\) |
k | How many selections |
|
inlinevirtual |
Implements SurfaceInspector::maths::permuters::IPermuter< T >.
|
inlinevirtual |
Implements SurfaceInspector::maths::permuters::IPermuter< T >.
|
virtual |
Implements SurfaceInspector::maths::permuters::IPermuter< T >.
|
inlinevirtual |
Implements SurfaceInspector::maths::permuters::IPermuter< T >.