#include <AlgorithmRecursionAndTempering.hpp>
|
| AlgorithmRecursionAndTempering (AbstractGenerator< V > &bg, const AlgorithmPrimitivity &primitivity=MersennePrimitivity) |
| Constructor. More...
|
|
bool | search (TemperingCalculatable< U, V > &lg, AlgorithmTempering< U, V > &st1, AlgorithmTempering< U, V > &st2, bool verbose=false, std::ostream &os=std::cout, bool no_lsb=false) |
| Search parameters for state transition function and parameters for tempering. More...
|
|
bool | search (TemperingCalculatable< U, V > &lg, AlgorithmTempering< U, V > &st, bool verbose=false, std::ostream &os=std::cout) |
| Simple wrapper for users who want to search tempering parameter only from MSB. More...
|
|
int | getWeight () |
| Returns Hamming weight of characteristic polynomial of state transition function. More...
|
|
int | getDelta () |
| returns sum of d(v)s, which are difference between k(v) and theoretical upper bound. More...
|
|
const NTL::GF2X & | getCharacteristicPolynomial () |
| Returns characteristic polynomial of state transition function. More...
|
|
template<typename U, typename V = U>
class MTToolBox::AlgorithmRecursionAndTempering< U, V >
-
Search parameters of state transion function of pseudo random number generator so that the characteristic polynomial of the funciton will have max degree and will be primitive.
-
Search tempering parameters to improve dimension of equi-distribution of output of pseudo random number generator.
- Warning
- The size of internal state of the generator whose parameters are searched is supporsed to be Mersenne Exponent.
- Template Parameters
-
U | Type of output of pseudo random number generator. Should be unsigned number. |
V | Type of output of parameter generator. |
template<typename U , typename V = U>
Constructor.
- Parameters
-
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. |
primitivity | An algorithm to check primitivity. As a default, MersennePrimitivity is selected. |
template<typename U , typename V = U>
Returns characteristic polynomial of state transition function.
- Returns
- characteristic polynomial of state transition function.
template<typename U , typename V = U>
returns sum of d(v)s, which are difference between k(v) and theoretical upper bound.
- Returns
- sum of d(v)s.
template<typename U , typename V = U>
Returns Hamming weight of characteristic polynomial of state transition function.
- Returns
- Hamming weight of characteristic polynomial.
template<typename U , typename V = U>
Search parameters for state transition function and parameters for tempering.
- Parameters
-
lg | GF(2)-linear pseudo random number generator whose parameters are to be searched. |
st1 | Algorithm for searching tempering parameters. |
st2 | Algorithm for searching tempering parameters from LSB. |
verbose | if true redundant messages will be outputed. |
os | output stream for redundant messages. |
no_lsb | if true, st2 will not be used. |
- Returns
- false if no tempering parameters which gives proper state transition function are found.
References MTToolBox::AbstractGenerator< U >::bitSize(), MTToolBox::AlgorithmEquidistribution< U, V >::get_all_equidist(), MTToolBox::RecursionSearchable< U, V >::getParamString(), MTToolBox::AlgorithmTempering< U, V >::isLSBTempering(), MTToolBox::isPrime(), MTToolBox::TemperingCalculatable< U, V >::resetReverseOutput(), and MTToolBox::TemperingCalculatable< U, V >::setReverseOutput().
Referenced by MTToolBox::AlgorithmRecursionAndTempering< U, V >::search().
template<typename U , typename V = U>
Simple wrapper for users who want to search tempering parameter only from MSB.
Parameters for state transition function are searched.
- Parameters
-
lg | GF(2)-linear pseudo random number generator whose parameters are to be searched. |
st | Algorithm for searching tempering parameters. |
verbose | if true redundant messages will be outputed. |
os | output stream for redundant messages. |
- Returns
- false if no tempering parameters which gives proper state transition function are found.
References MTToolBox::AlgorithmRecursionAndTempering< U, V >::search().
The documentation for this class was generated from the following file: