54template<
class T>
class UList;
71 std::uniform_real_distribution<scalar> uniform01_;
83 inline scalar scalar01();
113 inline label
seed()
const;
116 inline void reset(
const label seedValue);
135 Type
position(
const Type& start,
const Type& end);
171scalar Random::sample01<scalar>();
174label Random::sample01<label>();
177scalar Random::GaussNormal<scalar>();
180label Random::GaussNormal<label>();
183scalar Random::position<scalar>(
const scalar& start,
const scalar& end);
186label Random::position<label>(
const label& start,
const label& end);
189scalar Random::globalSample01<scalar>();
192label Random::globalSample01<label>();
195scalar Random::globalGaussNormal<scalar>();
198label Random::globalGaussNormal<label>();
201scalar Random::globalPosition<scalar>(
const scalar& start,
const scalar& end);
204label Random::globalPosition<label>(
const label& start,
const label& end);
A pseudo random number generator using the linear congruential algorithm with the following parameter...
A generator class returning a gaussian distributed random number.
gaussianGeneratorOp(const label seed=Random::defaultSeed)
Default construct or with seed value. Uses default [0,1] interval.
T operator()(const U &) const
T operator()()
Generate a random number.
Type position(const Type &start, const Type &end)
Return a sample on the interval [start,end].
int bit()
Return a random bit.
label seed() const
The initial random number seed that was used.
void globalRandomise01(Type &value)
Randomise value in the range 0-1.
Type sample01()
Return a sample whose components lie in the range [0,1].
Type globalSample01()
Return a sample whose components lie in the range [0,1].
void shuffle(UList< Type > &values)
Shuffle the values in the list.
void reset(const label seedValue)
Reset the random number generator seed.
static constexpr label defaultSeed
The default seed value (name may change in the future)
Type globalPosition(const Type &start, const Type &end)
Return a sample on the interval [start,end].
void randomise01(Type &value)
Randomise value in the range [0,1].
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
A traits class, which is primarily used for primitives.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...