#include <arcane/core/random/InversiveCongruential.h>
Public Types | |
| typedef IntType | result_type |
Public Member Functions | |
| result_type | min () const |
| Returns the minimum possible value of a sequence. | |
| result_type | max () const |
| Returns the maximum possible value of a sequence. | |
| InversiveCongruential (IntType x0=1) | |
Constructor with seed initialization from the value x0. | |
| void | seed (IntType x0) |
Initialization of the generator seed from the value x0. | |
| IntType | getState () const |
| Method that returns the generator state. | |
| IntType | operator() () |
| Overriding the operator () which returns the pseudo random value of the generator. The generator state is modified. | |
| bool | validation (IntType x) const |
| Validation function (I don't really know what it is for!). | |
| bool | operator== (const InversiveCongruential &rhs) const |
| Overriding the == operator. | |
Static Public Member Functions | |
| static IntType | apply (IntType x) |
Returns the pseudo-random value from the state x. The private member _x of the generator is not used and is not modified. | |
Static Public Attributes | |
| static const bool | has_fixed_range = true |
| static const result_type | min_value = (c == 0 ? 1 : 0) |
| static const result_type | max_value = m - 1 |
Private Attributes | |
| IntType | _x |
Class pattern InversiveCongruential. It allows defining classes of the Inversive Congruential type based on the parameters a, c, and m. The generated pseudo-random numbers are of type IntType.
The generation of a sequence of pseudo-random numbers is done:
(). In this case, the seed can seed. The generator state is managed internally via the _x. Its value is accessible via the getState() method.apply(x). The generator state x is managed outside the class. The seed and getState() methods are meaningless in this usage. Definition at line 49 of file InversiveCongruential.h.
| typedef IntType Arcane::random::InversiveCongruential< IntType, a, c, m, val >::result_type |
Definition at line 53 of file InversiveCongruential.h.
|
inlineexplicit |
Constructor with seed initialization from the value x0.
Definition at line 87 of file InversiveCongruential.h.
|
inlinestatic |
Returns the pseudo-random value from the state x. The private member _x of the generator is not used and is not
modified.
Definition at line 137 of file InversiveCongruential.h.
Referenced by Arcane::random::InversiveCongruential< Int32, 9102, 2147483647 - 36884165, 2147483647, 0 >::operator()().
|
inline |
Method that returns the generator state.
Definition at line 110 of file InversiveCongruential.h.
|
inline |
Returns the maximum possible value of a sequence.
Definition at line 76 of file InversiveCongruential.h.
|
inline |
Returns the minimum possible value of a sequence.
Definition at line 66 of file InversiveCongruential.h.
|
inline |
Overriding the operator () which returns the pseudo random value of the generator. The generator state is modified.
Definition at line 121 of file InversiveCongruential.h.
|
inline |
|
inline |
Initialization of the generator seed from the value x0.
Definition at line 100 of file InversiveCongruential.h.
|
inline |
Validation function (I don't really know what it is for!).
Definition at line 151 of file InversiveCongruential.h.
|
private |
Definition at line 168 of file InversiveCongruential.h.
|
static |
Definition at line 54 of file InversiveCongruential.h.
|
static |
Definition at line 56 of file InversiveCongruential.h.
|
static |
Definition at line 55 of file InversiveCongruential.h.