Multiplicative linear congruential uniform pseudo-random number generator. More...
#include <rnd.h>
Public Member Functions | |
RNGMulLinCon (uint32_t seed) | |
void | type (int v) |
Change the type of equation used. | |
uint32_t | operator[] (uint32_t i) const |
Array get; generates next element. | |
uint32_t & | operator[] (uint32_t i) |
Array set; sets current value. | |
uint32_t | operator() () const |
Generate next value. | |
Public Attributes | |
uint32_t | mul |
Multiplication amount. | |
uint32_t | val |
Value. |
Multiplicative linear congruential uniform pseudo-random number generator.
This generator is a faster LCG requiring only a single integer multiply.
RNGMulLinCon | ( | uint32_t | seed | ) |
[in] | seed | Initial seed value |
void type | ( | int | v | ) |
Change the type of equation used.
0 - Marsaglia, Super-Duper