#include <Selector.h>
Public Member Functions | |
| Selector (UWORD32 m, std::string pp) | |
| Selector (UWORD32 m) | |
| Selector (const std::vector< UWORD32 > &retvals) | |
| ~Selector (void) | |
| UWORD32 | operator[] (UWORD32 i) |
| UWORD32 | getRange (void) const |
Private Member Functions | |
| void | calculate (UWORD32 m) |
| bool | idxX (UWORD32 v, UWORD32 m, UWORD32 *p) const |
| void | setX (UWORD32 i, UWORD32 v) |
Private Attributes | |
| std::vector< UWORD32 > | X |
| std::vector< UWORD32 > | Y |
| sgi::hash_map< UWORD32, UWORD32 > | Xreversed |
| UWORD32 | Maximum |
| operator[] will return a value in {0,...,Maximum-1} | |
| UWORD32 | NumInArray |
| the number of calculated positions in the arrays | |
| PseudoRandomSource * | PRandom |
|
||||||||||||
|
construct a Selector object
|
|
|
construct a Selector object that resembles the identity permutation with range m
|
|
|
construct a Selector object that will return predefined values
|
|
|
|
|
|
fill X, Y and Xreversed until but not including index m |
|
|
|
|
||||||||||||||||
|
search an index i such that 0 <= i < m and X[i] == v
|
|
|
get the value at the i-th position
|
|
||||||||||||
|
set X[i] to v while maintaining Xreversed |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.7