54 : parameters_ ({min, max, seed})
55 , distribution_ (min, max)
57 if(parameters_.seed !=
static_cast<std::uint32_t
> (-1))
64 : parameters_ (parameters)
65 , distribution_ (parameters_.min, parameters_.max)
67 if(parameters_.
seed !=
static_cast<std::uint32_t
> (-1))
68 rng_.seed (parameters_.
seed);
72 template <
typename T>
void
75 if (seed !=
static_cast<std::uint32_t
> (-1))
77 parameters_.seed = seed;
78 rng_.seed(parameters_.seed);
83 template <
typename T>
void
86 parameters_.min = min;
87 parameters_.max = max;
88 parameters_.seed = seed;
89 typename DistributionType::param_type params (parameters_.min, parameters_.max);
90 distribution_.param (params);
91 distribution_.reset ();
92 if (seed !=
static_cast<std::uint32_t
> (-1))
94 parameters_.seed = seed;
95 rng_.seed (parameters_.seed);
100 template <
typename T>
void
103 parameters_ = parameters;
104 typename DistributionType::param_type params (parameters_.min, parameters_.max);
105 distribution_.param (params);
106 distribution_.reset ();
107 if (parameters_.seed !=
static_cast<std::uint32_t
> (-1))
108 rng_.seed (parameters_.seed);
112 template <
typename T>
114 : parameters_ ({mean, sigma, seed})
115 , distribution_ (mean, sigma)
117 if(parameters_.seed !=
static_cast<std::uint32_t
> (-1))
122 template <
typename T>
124 : parameters_ (parameters)
125 , distribution_ (parameters_.mean, parameters_.sigma)
132 template <
typename T>
void
135 if (seed !=
static_cast<std::uint32_t
> (-1))
137 parameters_.seed = seed;
143 template <
typename T>
void
146 parameters_.mean = mean;
147 parameters_.sigma = sigma;
148 parameters_.seed = seed;
149 typename DistributionType::param_type params (parameters_.mean, parameters_.sigma);
150 distribution_.param (params);
151 distribution_.reset ();
152 if (seed !=
static_cast<std::uint32_t
> (-1))
153 rng_.seed (parameters_.seed);
157 template <
typename T>
void
160 parameters_ = parameters;
161 typename DistributionType::param_type params (parameters_.mean, parameters_.sigma);
162 distribution_.param (params);
163 distribution_.reset ();
164 if (parameters_.seed !=
static_cast<std::uint32_t
> (-1))
165 rng_.seed (parameters_.seed);
void setParameters(T mean, T sigma, std::uint32_t seed=-1)
Set the normal number generator parameters.
void setSeed(std::uint32_t seed)
Change seed value.
std::mt19937 rng_
random number generator
Parameters parameters_
parameters
NormalGenerator(T mean=0, T sigma=1, std::uint32_t seed=-1)
Constructor.
CloudGenerator class generates a point cloud using some random number generator.