libstdc++
std::linear_congruential_engine< _UIntType, __a, __c, __m > Class Template Reference

Detailed Description

template<typename _UIntType, _UIntType __a, _UIntType __c, _UIntType __m>
class std::linear_congruential_engine< _UIntType, __a, __c, __m >

A model of a linear congruential random number generator.

A random number generator that produces pseudorandom numbers via linear function:

\[ x_{i+1}\leftarrow(ax_{i} + c) \bmod m \]

The template parameter _UIntType must be an unsigned integral type large enough to store values up to (__m-1). If the template parameter __m is 0, the modulus __m used is std::numeric_limits<_UIntType>::max() plus 1. Otherwise, the template parameters __a and __c must be less than __m.

The size of the state is $1$.

Definition at line 243 of file random.h.


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