Public Member Functions | Private Attributes
rtflann::UniqueRandom Class Reference

#include <random.h>

List of all members.

Public Member Functions

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

Private Attributes

int counter_
int size_
std::vector< int > vals_

Detailed Description

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

Definition at line 90 of file random.h.


Constructor & Destructor Documentation

Constructor.

Parameters:
nSize of the interval from which to generate
Returns:

Definition at line 102 of file random.h.


Member Function Documentation

void rtflann::UniqueRandom::init ( int  n) [inline]

Initializes the number generator.

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

Definition at line 111 of file random.h.

int rtflann::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 130 of file random.h.


Member Data Documentation

Definition at line 94 of file random.h.

Definition at line 93 of file random.h.

std::vector<int> rtflann::UniqueRandom::vals_ [private]

Definition at line 92 of file random.h.


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


rtabmap
Author(s): Mathieu Labbe
autogenerated on Sat Jul 23 2016 11:44:32