MTToolBox  0.2.10
Public Member Functions
MTToolBox::AlgorithmEquidistribution< U, V > Class Template Reference

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...
 

Detailed Description

template<typename U, typename V = U>
class MTToolBox::AlgorithmEquidistribution< U, V >

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.

Template Parameters
typeof output of pseudo random number generator.
typeof output of parameter generator.

Constructor & Destructor Documentation

template<typename U, typename V = U>
MTToolBox::AlgorithmEquidistribution< U, V >::AlgorithmEquidistribution ( const ECGenerator rand,
int  bit_length,
int  mexp = 0 
)
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.

Parameters
randpseudo random number generator
bit_lengthbit length from MSB to calculate dimension of equi-distribution. This is first v of k(v).
mexpMersenne 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().

template<typename U, typename V = U>
MTToolBox::AlgorithmEquidistribution< U, V >::~AlgorithmEquidistribution ( )
inline

Destructor.

Member Function Documentation

template<typename U , typename V >
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.

Warning
Only one of get_all_equidist() or get_equidist() can be called only one time. (Bad interface)
Parameters
[out]veqan array of k(v)
Returns
sum of d(v)s

Referenced by MTToolBox::AlgorithmReducibleRecursionAndTempering< U, G >::search(), and MTToolBox::AlgorithmRecursionAndTempering< U, V >::search().

template<typename U , typename V >
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.

Warning
Only one of get_all_equidist() or get_equidist() can be called only one time. (Bad interface)
Parameters
[out]sum_equidistsum of d(v)s
Returns
k(bit_length)

The documentation for this class was generated from the following file: