MTToolBox  0.2.10
AlgorithmReducibleEquidistribution.hpp
Go to the documentation of this file.
1 #ifndef MTTOOLBOX_ALGORITHM_REDUCIBLE_EQUIDISTRIBUTION_HPP
2 #define MTTOOLBOX_ALGORITHM_REDUCIBLE_EQUIDISTRIBUTION_HPP
3 
28 
29 namespace MTToolBox {
30  using namespace std;
50  template<typename U, typename G, typename V = U>
52  public:
76  const NTL::GF2X irreducibleFactor,
77  int bit_length,
78  int mexp) {
79  G * rand = new G(rg);
80  NTL::GF2X poly(0,1);
81  calcCharacteristicPolynomial(rand, poly);
82  NTL::GF2X quotient = poly / irreducibleFactor;
83  annihilate<U>(rand, quotient);
84  ae = new AlgorithmEquidistribution<U, V>(*rand, bit_length, mexp);
85  }
86 
97  delete ae;
98  }
99 
103  int get_all_equidist(int veq[]) {
104  return ae->get_all_equidist(veq);
105  }
106 
110  int get_equidist(int * sum_equidist) {
111  return ae->get_equidist(sum_equidist);
112  }
113  private:
115  };
116 }
117 #endif // MTTOOLBOX_ALGORITHM_REDUCIBLE_EQUIDISTRIBUTION_HPP
AlgorithmReducibleEquidistribution(const G &rg, const NTL::GF2X irreducibleFactor, int bit_length, int mexp)
Constructor.
Definition: AlgorithmReducibleEquidistribution.hpp:75
void calcCharacteristicPolynomial(RecursionSearchable< U, V > *rand, NTL::GF2X &poly)
int get_all_equidist(int veq[])
Calculate dimension of equi-distribution with v-bit accuracy.
Definition: AlgorithmReducibleEquidistribution.hpp:103
Calculate dimension of equi-distribution of output of pseudo random number generators.
Definition: AlgorithmEquidistribution.hpp:238
Calculate dimension of equi-distribution of reducible generator in worst case.
Definition: AlgorithmReducibleEquidistribution.hpp:51
Calculate dimension of equi-distribution of output of pseudo random number generators.
int get_equidist(int *sum_equidist)
Calculate dimension of equi-distribution with v-bit accuracy.
Definition: AlgorithmReducibleEquidistribution.hpp:110
~AlgorithmReducibleEquidistribution()
Destructor.
Definition: AlgorithmReducibleEquidistribution.hpp:96
name space for MTToolBox