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

Calculate dimension of equi-distribution of reducible generator in worst case. More...

#include <AlgorithmReducibleEquidistribution.hpp>

Public Member Functions

 AlgorithmReducibleEquidistribution (const G &rg, const NTL::GF2X irreducibleFactor, int bit_length, int mexp)
 Constructor. More...
 
 ~AlgorithmReducibleEquidistribution ()
 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 G, typename V = U>
class MTToolBox::AlgorithmReducibleEquidistribution< U, G, V >

Calculate dimension of equi-distribution of reducible generator in worst case.

Template Parameters
UType of output of pseudo random number generator. Should be unsigned number.
Grandom number generator
VType of output of parameter generator.

Constructor & Destructor Documentation

template<typename U , typename G , typename V = U>
MTToolBox::AlgorithmReducibleEquidistribution< U, G, V >::AlgorithmReducibleEquidistribution ( const G &  rg,
const NTL::GF2X  irreducibleFactor,
int  bit_length,
int  mexp 
)
inline

Constructor.

Parameters
[in]rgReducible GF(2)-linear generator whose dimention of equi-distribution will be searched.
[in]irreducibleFactoran irreducible factor with Mersenne Exponent degree of characteristic polynomial of generator.
[in]bit_lengthbit length of output.
[in]mexpMersenne Exponent.

References MTToolBox::calcCharacteristicPolynomial().

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

Destructor.

Member Function Documentation

template<typename U , typename G , typename V = U>
int MTToolBox::AlgorithmReducibleEquidistribution< U, G, V >::get_all_equidist ( int  veq[])
inline

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
template<typename U , typename G , typename V = U>
int MTToolBox::AlgorithmReducibleEquidistribution< U, G, V >::get_equidist ( int *  sum_equidist)
inline

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: