linbox
GF2RandIter Class Reference

#include <gf2.h>

Public Types

typedef bool Element
 
typedef size_t Residu_t
 

Public Member Functions

 GF2RandIter (const GF2 &F, const size_t &seed=0, const size_t &size=0)
 Constructor from field, sampling size, and seed.
 
 GF2RandIter (const GF2RandIter &)
 constructor
 
 ~GF2RandIter ()
 Destructor.
 
GF2RandIteroperator= (const GF2RandIter &R)
 Assignment operator.
 
bool & random (bool &a) const
 Random field element creator.
 
BitVector::reference random (BitVector::reference a) const
 Random field element creator.
 
stdBitReference random (stdBitReference a) const
 Random field element creator.
 
ElementAbstractrandom (ElementAbstract &a) const
 Random field element creator.
 
size_t & random (size_t &a) const
 
MersenneTwistergetMT ()
 
const MersenneTwistergetMT () const
 

Member Typedef Documentation

◆ Element

typedef bool Element

◆ Residu_t

typedef size_t Residu_t

Constructor & Destructor Documentation

◆ GF2RandIter() [1/2]

GF2RandIter ( const GF2 & F,
const size_t & seed = 0,
const size_t & size = 0 )
inline

Constructor from field, sampling size, and seed.

The random field element iterator works in the field F, is seeded by seed, and it returns any one element with probability no more than 1/min (size, F.cardinality (c)). A sampling size of zero means to sample from the entire field. A seed of zero means to use some arbitrary seed for the generator. Purely virtual.

Parameters
FLinBox field archetype object in which to do arithmetic
sizeconstant integer reference of sample size from which to sample (default = modulus of field)
seedconstant integer reference from which to seed random number generator (default = 0)

◆ GF2RandIter() [2/2]

GF2RandIter ( const GF2RandIter & )
inline

constructor

◆ ~GF2RandIter()

~GF2RandIter ( )
inline

Destructor.

This destructs the random field element generator object.

Member Function Documentation

◆ operator=()

GF2RandIter & operator= ( const GF2RandIter & R)
inline

Assignment operator.

Assigns ModularRandIter object R to generator.

Parameters
RModularRandIter object.

◆ random() [1/5]

bool & random ( bool & a) const
inline

Random field element creator.

This returns a random field element from the information supplied at the creation of the generator. Required by abstract base class.

Returns
reference to random field element

◆ random() [2/5]

BitVector::reference random ( BitVector::reference a) const
inline

Random field element creator.

This returns a random field element from the information supplied at the creation of the generator. Required by abstract base class.

Returns
reference to random field element

◆ random() [3/5]

stdBitReference random ( stdBitReference a) const
inline

Random field element creator.

This returns a random field element from the information supplied at the creation of the generator. Required by abstract base class.

Returns
reference to random field element

◆ random() [4/5]

ElementAbstract & random ( ElementAbstract & a) const
inline

Random field element creator.

This returns a random field element from the information supplied at the creation of the generator. Required by abstract base class.

Returns
reference to random field element

◆ random() [5/5]

size_t & random ( size_t & a) const
inline

◆ getMT() [1/2]

MersenneTwister & getMT ( )
inline

◆ getMT() [2/2]

const MersenneTwister & getMT ( ) const
inline

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