#include <modular-balanced.h>
Public Member Functions | |
ModularBalancedRandIter (const ModularBalanced< Element > &F, const integer &size=0, const integer &seed=0) | |
ModularBalancedRandIter (const ModularBalancedRandIter< Element > &R) | |
~ModularBalancedRandIter () | |
ModularBalancedRandIter < Element > & | operator= (const ModularBalancedRandIter< Element > &R) |
Element & | random (Element &a) const |
ElementAbstract & | random (ElementAbstract &a) const |
ModularBalancedRandIter | ( | const ModularBalanced< Element > & | F, | |
const integer & | size = 0 , |
|||
const integer & | seed = 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.
F | LinBox field archetype object in which to do arithmetic | |
size | constant integer reference of sample size from which to sample (default = modulus of field) | |
seed | constant integer reference from which to seed random number generator (default = 0) |
ModularBalancedRandIter | ( | const ModularBalancedRandIter< Element > & | R | ) | [inline] |
Copy constructor. Constructs ModularBalancedRandIter object by copying the random field element generator. This is required to allow generator objects to be passed by value into functions.
R | ModularBalancedRandIter object. |
~ModularBalancedRandIter | ( | ) | [inline] |
Destructor. This destructs the random field element generator object.
ModularBalancedRandIter<Element>& operator= | ( | const ModularBalancedRandIter< Element > & | R | ) | [inline] |
Assignment operator. Assigns ModularBalancedRandIter object R to generator.
R | ModularBalancedRandIter object. |
Element& random | ( | Element & | 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.
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.