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 <AlgorithmReducibleRecursionSearch.hpp>
template<typename U, typename V = U>
class MTToolBox::AlgorithmReducibleRecursionSearch< U, V >
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.
- Template Parameters
-
U | Type of output of pseudo random number generator. Should be unsigned number. |
V | Type of output of base generator. Should be unsigned number. |
template<typename U , typename V = U>
Constructor Size of internal state is supposed to be power of 2 and larger than Mersenne Exponent.
- Parameters
-
[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. |
template<typename U , typename V = U>
Returns a minimal polynomial of output of the pseudo random number generator.
Call this method only after start() returns true.
- Returns
- a minimal polynomial
This method may return a polynomial which may not be a characteristic polynomial.
template<typename U , typename V = U>
Returns tried count from the instance was created.
- Returns
- tried count from the instance was created.
template<typename U , typename V = U>
Returns a maxmum irreducible factor of minimal polynomial of output of the pseudo random number generator.
Call this method only after start() returns true.
- Returns
- a maxmun irreducible factor of minimal polynomial
template<typename U , typename V = U>
Returns a string which shows parameters of pseudo random Call this method only after start() returns true.
- Returns
- String which shows parameters of pseudo random number generator.
template<typename U , typename V = U>
Start searching recursion parameters.
-
the generator make parameters randomly (RecursionSearchable.setUpParam()),
-
calculate minimal polynomial of the generator,
-
check if the polynomial has max possible degree and is primitive.
-
if check OK, then return true.
-
else repeat from 1.
If repeat count is over try_count, then return false.
- Parameters
-
[in] | try_count | maximum count of try |
- Returns
- true when proper minimal polynomial is gotten.
References MTToolBox::hasFactorOfDegree(), and MTToolBox::minpoly().
The documentation for this class was generated from the following file: