MTToolBox
0.2.10
|
GF(2) pseudo random number generator as a GF(2) vector. More...
#include <AlgorithmEquidistribution.hpp>
Public Types | |
typedef EquidistributionCalculatable< U, V > | ECGenerator |
pseudo random number generator which can calculate dimension of equi-distribution. More... | |
Public Member Functions | |
linear_generator_vector (const ECGenerator &generator) | |
Constructor. More... | |
linear_generator_vector (const ECGenerator &generator, int bit_pos) | |
Constructor for standard basis. More... | |
void | add (const linear_generator_vector< U, V > &src) |
Vector addition. More... | |
void | next_state (int bit_len) |
State transition of pseudo random number generator. More... | |
void | debug_print () |
Data Fields | |
shared_ptr< ECGenerator > | rand |
A GF(2) linear pseudo random number generator. More... | |
int | count |
number which shows counts of next_state() called. More... | |
bool | zero |
Shows if zero vector or not. More... | |
U | next |
latest output of pseudo random number generator, or, a GF(2) vector consists of coefficients of highest degree term of polynomial. More... | |
GF(2) pseudo random number generator as a GF(2) vector.
This class treats a GF(2) pseudo random number generator as a GF(2) vector. And also the class treats the generator as a vector of polynomials over GF(2).
U | type of output of pseudo random number generator. Should be unsigned type. |
V | type of output of parameter generator. |
typedef EquidistributionCalculatable<U, V> MTToolBox::linear_generator_vector< U, V >::ECGenerator |
pseudo random number generator which can calculate dimension of equi-distribution.
|
inline |
Constructor.
generator | GF(2) pseudo random number generator, whose dimension of equi-distribution will be calculated. |
References MTToolBox::linear_generator_vector< U, V >::count, MTToolBox::linear_generator_vector< U, V >::next, MTToolBox::linear_generator_vector< U, V >::rand, MTToolBox::setZero(), and MTToolBox::linear_generator_vector< U, V >::zero.
|
inline |
Constructor for standard basis.
Construct a vector which consists standard basis. As a generator, this generates a number include only one bit once, and then generate zero forever. For instance, it generates 1, 0, 0, 0, ... or 8, 0, 0, 0, ...
References MTToolBox::linear_generator_vector< U, V >::count, MTToolBox::linear_generator_vector< U, V >::next, MTToolBox::linear_generator_vector< U, V >::rand, and MTToolBox::linear_generator_vector< U, V >::zero.
void MTToolBox::linear_generator_vector< U, V >::add | ( | const linear_generator_vector< U, V > & | src | ) |
Vector addition.
src | source vector to be added to this vector |
References MTToolBox::linear_generator_vector< U, V >::next, and MTToolBox::linear_generator_vector< U, V >::rand.
void MTToolBox::linear_generator_vector< U, V >::debug_print | ( | ) |
void MTToolBox::linear_generator_vector< U, V >::next_state | ( | int | bit_len | ) |
State transition of pseudo random number generator.
As a vector of polynomial, multiply by an indeterminate.
bit_len | bit length from MSB, or v of k(v) currently calculating. |
References MTToolBox::isZero().
Referenced by MTToolBox::AlgorithmEquidistribution< U, V >::AlgorithmEquidistribution().
int MTToolBox::linear_generator_vector< U, V >::count |
number which shows counts of next_state() called.
As a polynomial, this is related to degree of polynomial.
Referenced by MTToolBox::linear_generator_vector< U, V >::linear_generator_vector().
U MTToolBox::linear_generator_vector< U, V >::next |
latest output of pseudo random number generator, or, a GF(2) vector consists of coefficients of highest degree term of polynomial.
Referenced by MTToolBox::linear_generator_vector< U, V >::add(), and MTToolBox::linear_generator_vector< U, V >::linear_generator_vector().
shared_ptr<ECGenerator> MTToolBox::linear_generator_vector< U, V >::rand |
A GF(2) linear pseudo random number generator.
Referenced by MTToolBox::linear_generator_vector< U, V >::add(), and MTToolBox::linear_generator_vector< U, V >::linear_generator_vector().
bool MTToolBox::linear_generator_vector< U, V >::zero |
Shows if zero vector or not.
Referenced by MTToolBox::linear_generator_vector< U, V >::linear_generator_vector().