OpenCV  4.0.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)
inline

Constructor.

Parameters
nSize of the interval from which to generate
Returns

Member Function Documentation

§ init()

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

Initializes the number generator.

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

§ next()

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


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