#include <SimpleNonRepeatRandomNG.h>
Public Member Functions | |
SimpleNonRepeatRandomNG () | |
SimpleNonRepeatRandomNG (int low, int high) | |
virtual | ~SimpleNonRepeatRandomNG () |
void | reset (int numElem) |
void | rewind () |
void | reset (int low, int high, int numElem) |
int | operator() (RandomEngine &eng) |
Protected Attributes | |
int * | seq_array |
std::vector< int > | generated_numbers |
int | low |
int | high |
int | range |
int | cursor |
int | num_elem |
UniformDistribution | unidist |
bool | reseted |
This could be replaced by a more memory efficient algorithm, if found in literature. To see: "http://www.usenix.org/event/usenix99/full_papers/deraadt/deraadt_html/node17.html".
Definition at line 20 of file SimpleNonRepeatRandomNG.h.
SimpleNonRepeatRandomNG::SimpleNonRepeatRandomNG | ( | ) |
Definition at line 11 of file SimpleNonRepeatRandomNG.cpp.
SimpleNonRepeatRandomNG::~SimpleNonRepeatRandomNG | ( | ) | [virtual] |
void SimpleNonRepeatRandomNG::reset | ( | int | numElem | ) | [inline] |
Definition at line 39 of file SimpleNonRepeatRandomNG.h.
References cursor, generated_numbers, num_elem, and rewind().
Referenced by DegreeDistributionConnections::next(), reset(), and DegreeDistributionConnections::reset().
void SimpleNonRepeatRandomNG::rewind | ( | ) | [inline] |
Definition at line 50 of file SimpleNonRepeatRandomNG.h.
References cursor, generated_numbers, and seq_array.
Referenced by reset().
int SimpleNonRepeatRandomNG::operator() | ( | RandomEngine & | eng | ) |
Definition at line 32 of file SimpleNonRepeatRandomNG.cpp.
References cursor, generated_numbers, low, num_elem, range, seq_array, and unidist.
int* SimpleNonRepeatRandomNG::seq_array [protected] |
Definition at line 77 of file SimpleNonRepeatRandomNG.h.
Referenced by operator()(), reset(), rewind(), SimpleNonRepeatRandomNG(), and ~SimpleNonRepeatRandomNG().
std::vector< int > SimpleNonRepeatRandomNG::generated_numbers [protected] |
Definition at line 79 of file SimpleNonRepeatRandomNG.h.
Referenced by operator()(), reset(), and rewind().
int SimpleNonRepeatRandomNG::low [protected] |
int SimpleNonRepeatRandomNG::high [protected] |
Definition at line 83 of file SimpleNonRepeatRandomNG.h.
int SimpleNonRepeatRandomNG::range [protected] |
Definition at line 85 of file SimpleNonRepeatRandomNG.h.
Referenced by operator()(), reset(), and SimpleNonRepeatRandomNG().
int SimpleNonRepeatRandomNG::cursor [protected] |
Definition at line 87 of file SimpleNonRepeatRandomNG.h.
Referenced by operator()(), reset(), and rewind().
int SimpleNonRepeatRandomNG::num_elem [protected] |
UniformDistribution SimpleNonRepeatRandomNG::unidist [protected] |
bool SimpleNonRepeatRandomNG::reseted [protected] |
Definition at line 93 of file SimpleNonRepeatRandomNG.h.