MTToolBox
0.2.10
|
Calculate dimension of equi-distribution of output of pseudo random number generators. More...
#include <AlgorithmEquidistribution.hpp>
Public Member Functions | |
AlgorithmEquidistribution (const ECGenerator &rand, int bit_length, int mexp=0) | |
Constructor. More... | |
~AlgorithmEquidistribution () | |
Destructor. More... | |
int | get_all_equidist (int veq[]) |
Calculate dimension of equi-distribution with v-bit accuracy. More... | |
int | get_equidist (int *sum_equidist) |
Calculate dimension of equi-distribution with v-bit accuracy. More... | |
Calculate dimension of equi-distribution of output of pseudo random number generators.
Algorithm that calculates dimension of equi-distribution of output of pseudo random number generators using PIS method1.
type | of output of pseudo random number generator. |
type | of output of parameter generator. |
|
inline |
Constructor.
PIS method can calculates dimension of equi-distribution of v-bit accuracy k(v) using intermediate result of calculation of k(v+1). This class calculate multiple k(v) varying v from bit_length to 1.
rand | pseudo random number generator |
bit_length | bit length from MSB to calculate dimension of equi-distribution. This is first v of k(v). |
mexp | Mersenne Exponent. If not specified, internal state size is used. If generator is reducible, this parameter should be specified. |
References MTToolBox::AbstractGenerator< U >::bitSize(), and MTToolBox::linear_generator_vector< U, V >::next_state().
|
inline |
Destructor.
int MTToolBox::AlgorithmEquidistribution< U, V >::get_all_equidist | ( | int | veq[] | ) |
Calculate dimension of equi-distribution with v-bit accuracy.
Calculate dimension of equi-distribution with v-bit accuracy k(v) for v = bit_length to 1, and set them into an array veq[]. The return value is sum of d(v)s, which are difference between k(v) and theoretical upper bound at v.
[out] | veq | an array of k(v) |
Referenced by MTToolBox::AlgorithmReducibleRecursionAndTempering< U, G >::search(), and MTToolBox::AlgorithmRecursionAndTempering< U, V >::search().
int MTToolBox::AlgorithmEquidistribution< U, V >::get_equidist | ( | int * | sum_equidist | ) |
Calculate dimension of equi-distribution with v-bit accuracy.
Calculate dimension of equi-distribution with v-bit accuracy k(v) for v = bit_length. sum_equidist is sum of d(v)s, which are difference between k(v) and theoretical upper bound at v.
[out] | sum_equidist | sum of d(v)s |