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>
Classes | |
struct | Parameters |
Public Member Functions | |
const Parameters & | getParameters () |
T | run () |
void | setParameters (T min, T max, pcl::uint32_t seed=-1) |
void | setParameters (const Parameters ¶meters) |
void | setSeed (pcl::uint32_t seed) |
UniformGenerator (T min=0, T max=1, pcl::uint32_t seed=-1) | |
UniformGenerator (const Parameters ¶mters) | |
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 |
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.
typedef uniform_distribution<T>::type pcl::common::UniformGenerator< T >::DistributionType [private] |
typedef boost::mt19937 pcl::common::UniformGenerator< T >::EngineType [private] |
pcl::common::UniformGenerator< T >::UniformGenerator | ( | T | min = 0 , |
T | max = 1 , |
||
pcl::uint32_t | seed = -1 |
||
) |
Constructor
min,: | included lower bound |
max,: | included higher bound |
seed,: | seeding value |
Definition at line 48 of file random.hpp.
pcl::common::UniformGenerator< T >::UniformGenerator | ( | const Parameters & | paramters | ) |
Constructor
parameters | uniform distribution parameters and generator seed |
Definition at line 60 of file random.hpp.
const Parameters& pcl::common::UniformGenerator< T >::getParameters | ( | ) | [inline] |
T pcl::common::UniformGenerator< T >::run | ( | ) | [inline] |
void pcl::common::UniformGenerator< T >::setParameters | ( | T | min, |
T | max, | ||
pcl::uint32_t | seed = -1 |
||
) |
Set the uniform number generator parameters
[in] | min | minimum allowed value |
[in] | max | maximum allowed value |
[in] | seed | random number generator seed (applied if != -1) |
Definition at line 82 of file random.hpp.
void pcl::common::UniformGenerator< T >::setParameters | ( | const Parameters & | parameters | ) |
Set generator parameters
parameters | uniform distribution parameters and generator seed |
Definition at line 104 of file random.hpp.
void pcl::common::UniformGenerator< T >::setSeed | ( | pcl::uint32_t | seed | ) |
Change seed value
[in] | seed | new generator seed value |
Definition at line 71 of file random.hpp.
DistributionType pcl::common::UniformGenerator< T >::distribution_ [private] |
boost::variate_generator<EngineType&, DistributionType> pcl::common::UniformGenerator< T >::generator_ [private] |
Parameters pcl::common::UniformGenerator< T >::parameters_ [private] |
EngineType pcl::common::UniformGenerator< T >::rng_ [private] |