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);
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
Ignore parameter and generate a random number, which allows it to be used as a replacement for genera...
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 GaussNormal()
Return a sample whose components are normally distributed with zero mean and unity variance N(0,...
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.
Random(const label seedValue=defaultSeed)
Construct with seed value.
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].
Type globalGaussNormal()
Return a sample whose components are normally distributed with zero mean and unity variance N(0,...
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 and vector-space.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)