MTToolBox
0.2.10
|
Search parameters of state transition function of pseudo random number generator so that the characteristic polynomial of the function will have max degree and will be primitive. More...
#include <AlgorithmRecursionSearch.hpp>
Public Member Functions | |
AlgorithmRecursionSearch (RecursionSearchable< U, V > &generator, AbstractGenerator< V > &bg) | |
Constructor Size of internal state is supposed to be Mersenne Exponent. More... | |
AlgorithmRecursionSearch (RecursionSearchable< U, V > &generator, AbstractGenerator< V > &bg, const AlgorithmPrimitivity &primitivity) | |
Constructor Users can specify algorithm of primitivity judgement. More... | |
bool | start (int try_count) |
Start searching recursion parameters. More... | |
const std::string | getParamString () |
Returns a string which shows parameters of pseudo random Call this method only after start() returns true. More... | |
const NTL::GF2X & | getMinPoly () const |
Returns a minimal polynomial of output of the pseudo random number generator. More... | |
long | getCount () const |
Returns tried count from the instance was created. More... | |
Search parameters of state transition function of pseudo random number generator so that the characteristic polynomial of the function will have max degree and will be primitive.
U | Type of output of pseudo random number generator. Should be unsigned number. |
V | type of output of paramenter generator. |
|
inline |
Constructor Size of internal state is supposed to be Mersenne Exponent.
[in,out] | generator | GF(2)-linear generator whose parameters will be searched. The generator will be changed. |
[in,out] | bg | a generator used for generating numbers to make parameters. This generator is not need to be GF(2)-linear pseudo random number generator, for example, TinyMTDC in sample directory uses sequential counter. |
References MTToolBox::isPrime(), and MTToolBox::MersennePrimitivity.
|
inline |
Constructor Users can specify algorithm of primitivity judgement.
[in,out] | generator | GF(2)-linear generator whose parameters will be searched. The generator will be changed. |
[in,out] | bg | a generator used for generating numbers to make parameters. This generator is not need to be GF(2)-linear pseudo random number generator, for example, TinyMTDC in sample directory uses sequential counter. |
[in] | primitivity | A class to judge primitivity. |
References MTToolBox::isPrime().
|
inline |
Returns tried count from the instance was created.
|
inline |
Returns a minimal polynomial of output of the pseudo random number generator.
Call this method only after start() returns true.
|
inline |
Returns a string which shows parameters of pseudo random Call this method only after start() returns true.
|
inline |
Start searching recursion parameters.
If repeat count is over try_count, then return false.
[in] | try_count | maximum count of try |
References MTToolBox::isPrime(), and MTToolBox::minpoly().