OpenCV  3.2.0
Open Source Computer Vision
Public Member Functions | List of all members
cvflann::UniqueRandom Class Reference

#include "random.h"

Public Member Functions

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

Detailed Description

Random number generator that returns a distinct number from the [0,n) interval each time.

Constructor & Destructor Documentation

§ UniqueRandom()

cvflann::UniqueRandom::UniqueRandom ( int  n)

Constructor.

Parameters
nSize of the interval from which to generate
Returns

Member Function Documentation

§ init()

void cvflann::UniqueRandom::init ( int  n)

Initializes the number generator.

Parameters
nthe size of the interval from which to generate random numbers.

§ next()

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


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