libstdc++
|
A generalized feedback shift register discrete random number generator.
This algorithm avoids multiplication and division and is designed to be friendly to a pipelined architecture. If the parameters are chosen correctly, this generator will produce numbers with a very long period and fairly good apparent entropy, although still not cryptographically strong.
The best way to use this generator is with the predefined mt19937 class.
This algorithm was originally invented by Makoto Matsumoto and Takuji Nishimura.
__w | Word size, the number of bits in each element of the state vector. |
__n | The degree of recursion. |
__m | The period parameter. |
__r | The separation point bit index. |
__a | The last row of the twist matrix. |
__u | The first right-shift tempering matrix parameter. |
__d | The first right-shift tempering matrix mask. |
__s | The first left-shift tempering matrix parameter. |
__b | The first left-shift tempering matrix mask. |
__t | The second left-shift tempering matrix parameter. |
__c | The second left-shift tempering matrix mask. |
__l | The second right-shift tempering matrix parameter. |
__f | Initialization multiplier. |