libstdc++
std::subtract_with_carry_engine< _UIntType, __w, __s, __r > Class Template Reference

Detailed Description

template<typename _UIntType, size_t __w, size_t __s, size_t __r>
class std::subtract_with_carry_engine< _UIntType, __w, __s, __r >

The Marsaglia-Zaman generator.

This is a model of a Generalized Fibonacci discrete random number generator, sometimes referred to as the SWC generator.

A discrete random number generator that produces pseudorandom numbers using:

\[ x_{i}\leftarrow(x_{i - s} - x_{i - r} - carry_{i-1}) \bmod m \]

The size of the state is $r$ and the maximum period of the generator is $(m^r - m^s - 1)$.

Definition at line 666 of file random.h.


The documentation for this class was generated from the following file: