MTToolBox
0.2.10
|
Algorithm that search tempering parameters to improve dimension of equi-distribution of output of pseudo random number generator. More...
#include <AlgorithmPartialBitPattern.hpp>
Public Member Functions | |
int | operator() (TemperingCalculatable< U, V > &rand, bool verbose=false) |
Search tempering parameters. More... | |
bool | isLSBTempering () const |
Shows if searching tempering parameters is from LSBs. More... | |
Public Member Functions inherited from MTToolBox::AlgorithmTempering< U, V > | |
virtual | ~AlgorithmTempering () |
Virtual destructor (always required) More... | |
Algorithm that search tempering parameters to improve dimension of equi-distribution of output of pseudo random number generator.
This algorithm was developed when we design Mersenne Twister for Graphic Processors (MTGP). This algorithm also is used in Tiny Mersenne Twister (TinyMT).
U | type of output of pseudo random number generator, for example, uint32_t. Only unsigned numbers are allowed. |
V | type of output of parameter generator. |
bit_len | bit length of variable for tempering parameter |
param_num | number of tempering parameters, for instance, four for MTGP and one for TinyMT. |
try_bit_len | length of tempering part of output. |
step | specify how many bits are generated as bit pattern. If large number is specified, it will consume huge CPU time. For example, five is specified in MTGP parameter search. |
lsb | When lsb is true, meaning of MSBs and LSBs are changed. This program calculate equi-distribution from LSB not MSB. |
|
inlinevirtual |
Shows if searching tempering parameters is from LSBs.
Reimplemented from MTToolBox::AlgorithmTempering< U, V >.
|
inlinevirtual |
Search tempering parameters.
Searched parameters are set to rand. This process may consume large CPU time.
rand | pseudo random number generator |
verbose | if true output redundant messages. |
Implements MTToolBox::AlgorithmTempering< U, V >.
References MTToolBox::TemperingCalculatable< U, V >::resetReverseOutput(), and MTToolBox::TemperingCalculatable< U, V >::setReverseOutput().