A generator class returning a uniformly distributed random number on the given interval.
More...
|
| uniformGeneratorOp (const label seed=Random::defaultSeed) |
| Default construct or with seed value. Uses default [0,1] interval. More...
|
|
| uniformGeneratorOp (const T &minval, const T &maxval) |
| Construct with specified interval, using default seed. More...
|
|
| uniformGeneratorOp (const label seed, const T &minval, const T &maxval) |
| Construct with seed value and specified interval. More...
|
|
T | operator() () |
| Generate a random number. More...
|
|
template<class U > |
T | operator() (const U &) const |
| Ignore parameter and generate a random number, which allows it to be used as a replacement for general unary operators. More...
|
|
Public Member Functions inherited from Random |
| Random (const label seedValue=defaultSeed) |
| Construct with seed value. More...
|
|
| Random (const Random &rnd, const bool reset) |
| Copy construct with possible reset of seed. More...
|
|
label | seed () const |
| The initial random number seed that was used. More...
|
|
void | reset (const label seedValue) |
| Reset the random number generator seed. More...
|
|
int | bit () |
| Return a random bit. More...
|
|
template<class Type > |
Type | sample01 () |
| Return a sample whose components lie in the range [0,1]. More...
|
|
template<class Type > |
Type | GaussNormal () |
| Return a sample whose components are normally distributed with zero mean and unity variance N(0,1) More...
|
|
template<class Type > |
Type | position (const Type &start, const Type &end) |
| Return a sample on the interval [start,end]. More...
|
|
template<class Type > |
void | randomise01 (Type &value) |
| Randomise value in the range [0,1]. More...
|
|
template<class Type > |
void | shuffle (UList< Type > &values) |
| Shuffle the values in the list. More...
|
|
template<class Type > |
Type | globalSample01 () |
| Return a sample whose components lie in the range [0,1]. More...
|
|
template<class Type > |
Type | globalGaussNormal () |
| Return a sample whose components are normally distributed with zero mean and unity variance N(0,1) More...
|
|
template<class Type > |
Type | globalPosition (const Type &start, const Type &end) |
| Return a sample on the interval [start,end]. More...
|
|
template<class Type > |
void | globalRandomise01 (Type &value) |
| Randomise value in the range 0-1. More...
|
|
template<> |
Foam::scalar | sample01 () |
|
template<> |
Foam::label | sample01 () |
|
template<> |
Foam::scalar | GaussNormal () |
|
template<> |
Foam::label | GaussNormal () |
|
template<> |
Foam::scalar | position (const scalar &start, const scalar &end) |
|
template<> |
Foam::label | position (const label &start, const label &end) |
|
template<> |
Foam::scalar | globalSample01 () |
|
template<> |
Foam::label | globalSample01 () |
|
template<> |
Foam::scalar | globalGaussNormal () |
|
template<> |
Foam::label | globalGaussNormal () |
|
template<> |
Foam::scalar | globalPosition (const scalar &start, const scalar &end) |
|
template<> |
Foam::label | globalPosition (const label &start, const label &end) |
|
template<> |
scalar | sample01 () |
|
template<> |
label | sample01 () |
|
template<> |
scalar | GaussNormal () |
|
template<> |
label | GaussNormal () |
|
template<> |
scalar | position (const scalar &start, const scalar &end) |
|
template<> |
label | position (const label &start, const label &end) |
|
template<> |
scalar | globalSample01 () |
|
template<> |
label | globalSample01 () |
|
template<> |
scalar | globalGaussNormal () |
|
template<> |
label | globalGaussNormal () |
|
template<> |
scalar | globalPosition (const scalar &start, const scalar &end) |
|
template<> |
label | globalPosition (const label &start, const label &end) |
|
template<class T>
class Foam::Random::uniformGeneratorOp< T >
A generator class returning a uniformly distributed random number on the given interval.
- See also
- std::generate()
Definition at line 96 of file Random.H.