MTToolBox
0.2.10
|
This class is an Abstract class for calculating dimension of equi-distribution for GF(2)-linear pseudo random number generators. More...
#include <EquidistributionCalculatable.hpp>
Public Member Functions | |
virtual | ~EquidistributionCalculatable () |
Virtual destructor (always required) More... | |
virtual EquidistributionCalculatable< U, V > * | clone () const =0 |
Return copy of myself. More... | |
virtual U | generate (int outBitLen)=0 |
output outBitLen from MSB. More... | |
virtual void | add (EquidistributionCalculatable< U, V > &that)=0 |
Add internal state of GF(2)-linear pseudo random number generators. More... | |
virtual void | setZero ()=0 |
Set all zero to internal state. More... | |
virtual bool | isZero () const =0 |
Check if bits in internal state are all zero. More... | |
Public Member Functions inherited from MTToolBox::RecursionSearchable< U, V > | |
virtual | ~RecursionSearchable () |
Virtual destructor (always required) More... | |
virtual void | setUpParam (AbstractGenerator< V > &generator)=0 |
Users should set parameters for their generator when this method is called. More... | |
virtual const std::string | getHeaderString ()=0 |
Returns header string of parameters. More... | |
virtual const std::string | getParamString ()=0 |
Returns string expression of parameters. More... | |
Public Member Functions inherited from MTToolBox::AbstractGenerator< U > | |
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... | |
This class is an Abstract class for calculating dimension of equi-distribution for GF(2)-linear pseudo random number generators.
U | type of output of pseudo random number generator, should be unsinged number. |
V | type of oiutput of parameter generator. |
|
inlinevirtual |
Virtual destructor (always required)
|
pure virtual |
Add internal state of GF(2)-linear pseudo random number generators.
for (int i = 0; i < size; i++) { state[(index + i) % size] ^= that.state[(that.index + i) % size]; }
Referenced by MTToolBox::annihilate().
|
pure virtual |
Return copy of myself.
Referenced by MTToolBox::annihilate(), and MTToolBox::TestLinearity< U, V >::operator()().
|
pure virtual |
output outBitLen from MSB.
Remained bits should be all zeros. Users should call statte transition function inside this method.
[in] | outBitLen | Shows how many bits are outputed. |
Referenced by MTToolBox::annihilate().
|
pure virtual |
Check if bits in internal state are all zero.
When using an incomplete array like Mersenne Twister, user should check bits in true internal state.
|
pure virtual |
Set all zero to internal state.
Referenced by MTToolBox::annihilate().