linbox

Random field base element generator. More...
#include <generic.h>
Public Member Functions  
GenericRandIter (const Field &F, const integer &size=0, const integer &seed=0)  
Constructor from field, sampling size, and seed. More...  
Element &  random (Element &a) const 
Random field element creator. More...  
ElementAbstract &  random (ElementAbstract &a) const 
Random field element creator. More...  
Random field base element generator.
This is a generator of random field elements that can be used with any field. It initializes elements using rand(). For prime fields with p < 2^32, a nearuniform distrubution can be expected. For larger fields or nonprime fields, a nearuniform distribution on an unspecified subset of the elements can be expected.

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.characteristic(c))
. A sampling size of zero means to sample from the entire prime subfield. A seed of zero means to use some arbitrary seed for the generator which will vary from run to run.
F  LinBox field 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) 

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.

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.