Classes | Public Member Functions | Private Types | Private Attributes
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 <random.h>

List of all members.

Classes

struct  Parameters

Public Member Functions

const ParametersgetParameters ()
run ()
void setParameters (T min, T max, pcl::uint32_t seed=-1)
void setParameters (const Parameters &parameters)
void setSeed (pcl::uint32_t seed)
 UniformGenerator (T min=0, T max=1, pcl::uint32_t seed=-1)
 UniformGenerator (const Parameters &paramters)

Private Types

typedef uniform_distribution
< T >::type 
DistributionType
typedef boost::mt19937 EngineType

Private Attributes

DistributionType distribution_
 uniform distribution
boost::variate_generator
< EngineType
&, DistributionType
generator_
 generator of random number from a uniform distribution
Parameters parameters_
 parameters
EngineType rng_
 random number generator

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 86 of file random.h.


Member Typedef Documentation

template<typename T>
typedef uniform_distribution<T>::type pcl::common::UniformGenerator< T >::DistributionType [private]

Definition at line 144 of file random.h.

template<typename T>
typedef boost::mt19937 pcl::common::UniformGenerator< T >::EngineType [private]

Definition at line 143 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:
min,:included lower bound
max,:included higher bound
seed,:seeding value

Definition at line 48 of file random.hpp.

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

Constructor

Parameters:
parametersuniform distribution parameters and generator seed

Definition at line 60 of file random.hpp.


Member Function Documentation

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

Definition at line 136 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 140 of file random.h.

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.

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.

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.


Member Data Documentation

template<typename T>
DistributionType pcl::common::UniformGenerator< T >::distribution_ [private]

uniform distribution

Definition at line 148 of file random.h.

template<typename T>
boost::variate_generator<EngineType&, DistributionType> pcl::common::UniformGenerator< T >::generator_ [private]

generator of random number from a uniform distribution

Definition at line 152 of file random.h.

template<typename T>
Parameters pcl::common::UniformGenerator< T >::parameters_ [private]

parameters

Definition at line 146 of file random.h.

template<typename T>
EngineType pcl::common::UniformGenerator< T >::rng_ [private]

random number generator

Definition at line 150 of file random.h.


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


pcl
Author(s): Open Perception
autogenerated on Wed Aug 26 2015 15:43:48