OpenCV
3.2.0
Open Source Computer Vision
|
#include "random.h"
Public Member Functions | |
UniqueRandom (int n) | |
void | init (int n) |
int | next () |
Random number generator that returns a distinct number from the [0,n) interval each time.
cvflann::UniqueRandom::UniqueRandom | ( | int | n | ) |
Constructor.
n | Size of the interval from which to generate |
void cvflann::UniqueRandom::init | ( | int | n | ) |
Initializes the number generator.
n | the size of the interval from which to generate random numbers. |
int cvflann::UniqueRandom::next | ( | ) |
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