cvflann::UniqueRandom Class Reference
#include <random.h>
List of all members.
Detailed Description
Random number generator that returns a distinct number from the [0,n) interval each time.
TODO: improve on this to use a generator function instead of an array of randomly permuted numbers
Definition at line 66 of file random.h.
Constructor & Destructor Documentation
cvflann::UniqueRandom::UniqueRandom |
( |
int |
n |
) |
[inline] |
Constructor. Params: n = the size of the interval from which to generate random numbers.
Definition at line 79 of file random.h.
cvflann::UniqueRandom::~UniqueRandom |
( |
|
) |
[inline] |
Member Function Documentation
void cvflann::UniqueRandom::init |
( |
int |
n |
) |
[inline] |
Initializes the number generator. Params: n = the size of the interval from which to generate random numbers.
Definition at line 94 of file random.h.
int cvflann::UniqueRandom::next |
( |
|
) |
[inline] |
Return a distinct random integer in greater or equal to 0 and less than 'n' on each call. It should be called maximum 'n' times. Returns: a random integer
Definition at line 123 of file random.h.
Member Data Documentation
The documentation for this class was generated from the following file: