Uniformly random labels.
More...
#include <Labels.h>
|
| | RandomLabels (uint numLabels, uint maxLabel, RNG &generator) |
| |
| const int & | operator[] (uint index) const |
| |
| void | set (uint id, const int &value) |
| |
template<typename RNG>
struct RandomLabels< RNG >
Uniformly random labels.
Definition at line 76 of file Labels.h.
Create a new set of labels, distributed uniformly at random
- Parameters
-
| numLabels | the number of labels to generate |
| maxLabel | the range of labels to generate (e.g., for 0 to 9, specify 10) |
| generator | the random generator to use |
Definition at line 81 of file Labels.h.
template<typename RNG>
| const int& RandomLabels< RNG >::operator[] |
( |
uint |
index | ) |
const |
|
inlinevirtual |
Access operator
- Parameters
-
| index | the index of the label to look up |
- Returns
- the label value for the given index
Implements LabelsT< int >.
Definition at line 88 of file Labels.h.
template<typename RNG>
| void RandomLabels< RNG >::set |
( |
uint |
id, |
|
|
const int & |
value |
|
) |
| |
|
inlinevirtual |
Set a label
- Parameters
-
| id | the index of the label to set |
| value | the value to set the label to |
Implements LabelsT< int >.
Definition at line 93 of file Labels.h.
The documentation for this struct was generated from the following file: