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

Checks if a pseudo random number generator is GF(2)-linear. More...

#include <TestLinearity.hpp>

Public Member Functions

bool operator() (const EquidistributionCalculatable< U, V > &generator)
 Checks if generator is GF(2)-linear. More...
 

Detailed Description

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

Checks if a pseudo random number generator is GF(2)-linear.

This class checks if a pseudo random number generator is GF(2)-linear. The pseudo random number generator to be tested should be sub class of EquidistributionCalculatable. Failing the test means the generator is not GF(2)-linear, but passing the test does not assure the generator is GF(2)-linear.

Note
If users are sure that the generator is GF(2)-linear and the generator fails this test, there may be a problem in user's implementation of Equidistribution::add in user's generator.
Template Parameters
Utype of output of the generator, should be unsigned number.
Vtype of output of parameter generator

Member Function Documentation

template<typename U , typename V = U>
bool MTToolBox::TestLinearity< U, V >::operator() ( const EquidistributionCalculatable< U, V > &  generator)
inline

Checks if generator is GF(2)-linear.

Parameters
generatorpseudorandom number generator to be tested
Returns
true generator is GF(2)-linear with high probability.
false generator is not GF(2)-linear.

References MTToolBox::EquidistributionCalculatable< U, V >::clone(), and MTToolBox::AbstractGenerator< U >::seed().


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