cpp/numeric/random/seed seq/generate

Fills the range with unsigned integer values, $0 ≤ i < 232$, based on the data originally provided in the constructor of this. The produced values are distributed over the entire 32-bit range even if the initial values were strongly biased.

The following algorithm is used (adapted from the initialization sequence of the Mersenne Twister generator by Makoto Matsumoto and Takuji Nishimura, incorporating the improvements made by Mutsuo Saito in 2007)


 * If, do nothing. Otherwise,


 * First, set each element of the output range to the value.


 * Transform the elements of the output range according to the following algorithm:

For

where and and and is the private container holding the values originally provided by the constructor of this  object, where and and and and and if,  if ,  if.

For , where and

where all calculations are performed $modulo 232$ and where the indexing of the output range is taken $modulo n$.

Return value
None, the results are written to the range.

Exceptions
Only throws if the operations on and  throw.