MTToolBox
0.2.10
|
Algorithm which searches tempering parameters. More...
#include <AlgorithmBestBits.hpp>
Public Types | |
typedef temper_params< U > | tempp |
a class which keeps tempering parameters. More... | |
Public Member Functions | |
AlgorithmBestBits (int out_bit_length, const int shift_values[], int param_num, int limit_v) | |
~AlgorithmBestBits () | |
A destructor. More... | |
int | operator() (TemperingCalculatable< U, V > &rand, bool verbose=false) |
Search tempering parameters. More... | |
bool | isLSBTempering () const |
Shows if tempering is from LSB. More... | |
Public Member Functions inherited from MTToolBox::AlgorithmTempering< U, V > | |
virtual | ~AlgorithmTempering () |
Virtual destructor (always required) More... | |
Algorithm which searches tempering parameters.
An algorithm which searches tempering parameters which improve equi-distribution property of pseudo random number generator. This algorithm simulate the algorithm of Dynamic creator of Mersenne Twister.
U | type of output of pseudo random number generator. Should be unsigned type. |
V | type of output of parameter generator. |
typedef temper_params<U> MTToolBox::AlgorithmBestBits< U, V >::tempp |
a class which keeps tempering parameters.
|
inline |
[in] | out_bit_length | Bit length of tempering parameters. usually, this equals to bit length of an output. |
[in] | shift_values | Shift values corresponds to tempering parameter. Positive integers mean left shift and negative integers are not supported in current version. |
[in] | param_num | Number of tempering parameters. In MTDC, this is two. Do not specify numbers over 7. Test is only done for 2. Greater numbers will consume huge CPU time and huge memories. |
[in] | limit_v | limit of tempering bit. Each tempering parameters are searched for limit bit plus shift values of parameters following to the parameters. Greater limit will consume huge CPU time and huge memories. |
|
inline |
A destructor.
|
inlinevirtual |
Shows if tempering is from LSB.
Reimplemented from MTToolBox::AlgorithmTempering< U, V >.
|
inlinevirtual |
Search tempering parameters.
Generate tempering parameters and Calculate dimension of equi-distribution and then choose tempering parameters which gives high dimension of equi-distribution. Searched tempering parameters are set to the pseudo random number generator.
[in,out] | rand | A pseudo random number generator |
[in] | verbose | A flag for printing redundant message |
Implements MTToolBox::AlgorithmTempering< U, V >.
References MTToolBox::AbstractGenerator< U >::bitSize(), MTToolBox::TemperingCalculatable< U, V >::resetReverseOutput(), MTToolBox::TemperingCalculatable< U, V >::setTemperingPattern(), and MTToolBox::TemperingCalculatable< U, V >::setUpTempering().