Public Member Functions
cvflann::UniqueRandom Class Reference

#include <random.h>

List of all members.

Public Member Functions

 UniqueRandom (int n)
 ~UniqueRandom ()
void init (int n)
int next ()

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


Constructor & Destructor Documentation

Constructor. Params: n = the size of the interval from which to generate random numbers.


Member Function Documentation

Initializes the number generator. Params: n = the size of the interval from which to generate random numbers.

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


The documentation for this class was generated from the following file: