Point Cloud Library (PCL)  1.9.1-dev
List of all members | Classes | Public Member Functions
pcl::common::UniformGenerator< T > Class Template Reference

UniformGenerator class generates a random number from range [min, max] at each run picked according to a uniform distribution i.e eaach number within [min, max] has almost the same probability of being drawn. More...

#include <pcl/common/random.h>

Classes

struct  Parameters
 

Public Member Functions

 UniformGenerator (T min=0, T max=1, pcl::uint32_t seed=-1)
 Constructor. More...
 
 UniformGenerator (const Parameters &parameters)
 Constructor. More...
 
void setSeed (pcl::uint32_t seed)
 Change seed value. More...
 
void setParameters (T min, T max, pcl::uint32_t seed=-1)
 Set the uniform number generator parameters. More...
 
void setParameters (const Parameters &parameters)
 Set generator parameters. More...
 
const ParametersgetParameters ()
 
run ()
 

Detailed Description

template<typename T>
class pcl::common::UniformGenerator< T >

UniformGenerator class generates a random number from range [min, max] at each run picked according to a uniform distribution i.e eaach number within [min, max] has almost the same probability of being drawn.

Author
Nizar Sallem

Definition at line 85 of file random.h.

Constructor & Destructor Documentation

template<typename T >
pcl::common::UniformGenerator< T >::UniformGenerator ( min = 0,
max = 1,
pcl::uint32_t  seed = -1 
)

Constructor.

Parameters
minincluded lower bound
maxincluded higher bound
seedseeding value

Definition at line 48 of file random.hpp.

References pcl::common::UniformGenerator< T >::Parameters::seed.

template<typename T >
pcl::common::UniformGenerator< T >::UniformGenerator ( const Parameters parameters)

Constructor.

Parameters
parametersuniform distribution parameters and generator seed

Definition at line 60 of file random.hpp.

References pcl::common::UniformGenerator< T >::Parameters::seed.

Member Function Documentation

template<typename T>
const Parameters& pcl::common::UniformGenerator< T >::getParameters ( )
inline
Returns
uniform distribution parameters and generator seed

Definition at line 135 of file random.h.

template<typename T>
T pcl::common::UniformGenerator< T >::run ( )
inline
Returns
a randomly generated number in the interval [min, max]

Definition at line 139 of file random.h.

Referenced by pcl::recognition::ModelLibrary::Model::Model().

template<typename T >
void pcl::common::UniformGenerator< T >::setParameters ( min,
max,
pcl::uint32_t  seed = -1 
)

Set the uniform number generator parameters.

Parameters
[in]minminimum allowed value
[in]maxmaximum allowed value
[in]seedrandom number generator seed (applied if != -1)

Definition at line 82 of file random.hpp.

References pcl::common::UniformGenerator< T >::Parameters::max, pcl::common::UniformGenerator< T >::Parameters::min, and pcl::common::UniformGenerator< T >::Parameters::seed.

Referenced by pcl::recognition::ModelLibrary::Model::Model().

template<typename T >
void pcl::common::UniformGenerator< T >::setParameters ( const Parameters parameters)

Set generator parameters.

Parameters
parametersuniform distribution parameters and generator seed

Definition at line 104 of file random.hpp.

References pcl::common::UniformGenerator< T >::Parameters::max, pcl::common::UniformGenerator< T >::Parameters::min, and pcl::common::UniformGenerator< T >::Parameters::seed.

template<typename T >
void pcl::common::UniformGenerator< T >::setSeed ( pcl::uint32_t  seed)

Change seed value.

Parameters
[in]seednew generator seed value

Definition at line 71 of file random.hpp.

References pcl::common::UniformGenerator< T >::Parameters::seed.


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