![]() |
PropWare
3.0.0.229
C++ objects and CMake build system for Parallax Propeller
|
Modules | |
Random Number Distributions | |
Discrete Distributions | |
Variables | |
int | x |
Produces random numbers on a given distribution function using a non-uniform random number generation engine.
Constructs a variate generator with the uniform random number generator __eng
for the random distribution __dist
.
Any | exceptions which may thrown by the copy constructors of the _Engine or _Dist objects. |
Gets the next generated value on the distribution.
WTF?
Gets a reference to the underlying uniform random number generator object.
Gets a const reference to the underlying uniform random number generator object.
Gets a reference to the underlying random distribution.
Gets a const reference to the underlying random distribution.
Gets the closed lower bound of the distribution interval.
Gets the closed upper bound of the distribution interval.
These classes define objects which provide random or pseudorandom numbers, either from a discrete or a continuous interval. The random number generator supplied as a part of this library are all uniform random number generators which provide a sequence of random number uniformly distributed over their range.
A number generator is a function object with an operator() that takes zero arguments and returns a number.
A compliant random number generator must satisfy the following requirements.
To be documented. |
_M_p Current index of x |
#include <Simple-Libraries/Learn/Examples/Badge/01 Display/07 Box and Lines.c>
The type of the generated random value.
Constructs a default-initialized % subtract_with_carry random number generator.
Constructs an explicitly seeded % subtract_with_carry random number generator.
Constructs a subtract_with_carry random number generator engine seeded from the generator function __g
.
__g | The seed generator function. |
Seeds the initial state \( x_0 \) of the random number generator.
N1688[4.19] modifies this as follows. If __value
== 0, sets value to 19780503. In any case, with a linear congruential generator lcg(i) having parameters \( m_{lcg} = 2147483563, a_{lcg} = 40014, c_{lcg} = 0, and lcg(0) = value \), sets \( x_{-r} \dots x_{-1} \) to \( lcg(1) \bmod m \dots lcg(r) \bmod m \) respectively. If \( x_{-1} = 0 \) set carry to 1, otherwise sets carry to 0.
Seeds the initial state \( x_0 \) of the % subtract_with_carry random number generator.
Gets the inclusive minimum value of the range of random integers returned by this generator.
Gets the inclusive maximum value of the range of random integers returned by this generator.
Gets the next random number in the sequence.
Compares two % subtract_with_carry random number generator objects of the same type for equality.
__lhs | A % subtract_with_carry random number generator object. |
__rhs | Another % subtract_with_carry random number generator object. |
Compares two % subtract_with_carry random number generator objects of the same type for inequality.
__lhs | A % subtract_with_carry random number generator object. |
__rhs | Another % subtract_with_carry random number generator object. |
Inserts the current state of a % subtract_with_carry random number generator engine __x
into the output stream __os
.
__os | An output stream. |
__x | A % subtract_with_carry random number generator engine. |
__x
inserted or in an error state.Extracts the current state of a % subtract_with_carry random number generator engine __x
from the input stream __is
.
__is | An input stream. |
__x | A % subtract_with_carry random number generator engine. |
__x
extracted or in an error state.The Marsaglia-Zaman generator (floats version).
Definition at line 13 of file 07 Box and Lines.c.