MTToolBox
0.2.10
|
pseudo random number generator. More...
#include <AbstractGenerator.hpp>
Public Member Functions | |
virtual | ~AbstractGenerator () |
Virtual destructor (always required) More... | |
virtual U | generate ()=0 |
transit current internal state to next state and output a pseudo random number. More... | |
virtual void | seed (U value)=0 |
initialize internal state More... | |
virtual int | bitSize () const =0 |
Return bit size of internal state, i.e dimension of GF(2)-vector space. More... | |
pseudo random number generator.
U | output type of a pseudo random number generator. |
|
inlinevirtual |
Virtual destructor (always required)
|
pure virtual |
Return bit size of internal state, i.e dimension of GF(2)-vector space.
It will be Mersenne Exponent, when generator use incomplete array, like Mersenne Twister.
Implemented in MTToolBox::MersenneTwister, MTToolBox::MersenneTwister64, and MTToolBox::Sequential< T >.
Referenced by MTToolBox::AlgorithmEquidistribution< U, V >::AlgorithmEquidistribution(), MTToolBox::calcCharacteristicPolynomial(), MTToolBox::minpoly(), MTToolBox::AlgorithmBestBits< U, V >::operator()(), and MTToolBox::AlgorithmRecursionAndTempering< U, V >::search().
|
pure virtual |
transit current internal state to next state and output a pseudo random number.
Implemented in MTToolBox::MersenneTwister64, MTToolBox::MersenneTwister, and MTToolBox::Sequential< T >.
Referenced by MTToolBox::minpoly().
|
pure virtual |
initialize internal state
Initialization function does not need to be a GF(2)-linear function, non-GF(2)-linear function will be suitable. But as far as MTToolBox concerned, initialization only need to assure that the internal state is not zero. When generator use incomplete array, like Mersenne Twister, really used part of array should be set non-zero.
[in] | value | seed of initialization |
Implemented in MTToolBox::MersenneTwister64, MTToolBox::MersenneTwister, and MTToolBox::Sequential< T >.
Referenced by MTToolBox::TestLinearity< U, V >::operator()().