Go to the documentation of this file.
47 #ifndef cachedRandom_H
48 #define cachedRandom_H
140 Type
position(
const Type& start,
const Type& end);
172 scalar cachedRandom::sample01<scalar>();
175 label cachedRandom::sample01<label>();
178 scalar cachedRandom::GaussNormal<scalar>();
181 label cachedRandom::GaussNormal<label>();
184 scalar cachedRandom::position<scalar>
191 label cachedRandom::position<label>(
const label& start,
const label& end);
194 scalar cachedRandom::globalSample01<scalar>();
197 label cachedRandom::globalSample01<label>();
200 scalar cachedRandom::globalGaussNormal<scalar>();
203 label cachedRandom::globalGaussNormal<label>();
206 scalar cachedRandom::globalPosition<scalar>
213 label cachedRandom::globalPosition<label>(
const label& start,
const label& end);
Type sample01()
Return a sample whose components lie in the range 0-1.
label sampleI_
Current sample marker.
Type globalSample01()
Return a sample whose components lie in the range 0-1.
Type globalPosition(const Type &start, const Type &end)
Return a sample between start and end.
void globalRandomise01(Type &value)
Randomise value in the range 0-1.
label sampleI() const
Return the current sample marker.
label seed_
Initial random number seed.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Type globalGaussNormal()
Return a sample whose components are normally distributed.
Type position(const Type &start, const Type &end)
Return a sample between start and end.
const scalarList & samples() const
Return const access to the list of samples.
void randomise01(Type &value)
Randomise value in the range 0-1.
scalar scalar01()
Returns the current sample.
scalar gaussSample_
Stored sample value.
scalarList samples_
List of scalar samples.
bool hasGaussSample_
Indicator, which tells if there is a stored gaussian sample.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
label seed() const
Return const access to the initial random number seed.
cachedRandom(const label seed, const label count)
Construct given seed and sample count.
Type GaussNormal()
Return a sample whose components are normally distributed.