40 #ifndef PCL_COMMON_RANDOM_H_ 41 #define PCL_COMMON_RANDOM_H_ 44 #pragma GCC system_header 47 #include <boost/random/uniform_real.hpp> 48 #include <boost/random/uniform_int.hpp> 49 #include <boost/random/variate_generator.hpp> 50 #include <boost/random/normal_distribution.hpp> 51 #include <boost/random/mersenne_twister.hpp> 52 #include <pcl/pcl_macros.h> 64 typedef boost::uniform_int<int>
type;
70 typedef boost::uniform_real<float>
type;
76 typedef boost::normal_distribution<T>
type;
91 Parameters (T _min = 0, T _max = 1, pcl::uint32_t _seed = 1)
118 setSeed (pcl::uint32_t seed);
126 setParameters (T min, T max, pcl::uint32_t seed = -1);
140 run () {
return (generator_ ()); }
143 typedef boost::mt19937 EngineType;
148 DistributionType distribution_;
152 boost::variate_generator<EngineType&, DistributionType> generator_;
166 Parameters (T _mean = 0, T _sigma = 1, pcl::uint32_t _seed = 1)
193 setSeed (pcl::uint32_t seed);
201 setParameters (T mean, T sigma, pcl::uint32_t seed = -1);
215 run () {
return (generator_ ()); }
226 boost::variate_generator<EngineType&, DistributionType >
generator_;
231 #include <pcl/common/impl/random.hpp> Parameters parameters_
parameters
EngineType rng_
random number generator
This file defines compatibility wrappers for low level I/O functions.
boost::variate_generator< EngineType &, DistributionType > generator_
generator of random number from a normal distribution
Parameters(T _mean=0, T _sigma=1, pcl::uint32_t _seed=1)
boost::mt19937 EngineType
const Parameters & getParameters()
normal_distribution< T >::type DistributionType
DistributionType distribution_
normal distribution
NormalGenerator class generates a random number from a normal distribution specified by (mean...
boost::normal_distribution< T > type