Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

GenericRandIter Class Template Reference

#include <generic.h>

List of all members.


Detailed Description

template<class Field>
class LinBox::GenericRandIter< Field >

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 near-uniform distrubution can be expected. For larger fields or non-prime fields, a near-uniform distribution on an unspecified subset of the elements can be expected.


Public Types

typedef Field::Element Element

Public Methods

 GenericRandIter (const Field &F, const integer &size=0, const integer &seed=0)
 GenericRandIter (const GenericRandIter< Field > &R)
 ~GenericRandIter ()
GenericRandIter< Field > & operator= (const GenericRandIter< Field > &R)
Elementrandom (Element &a) const
ElementAbstractrandom (ElementAbstract &a) const


Member Typedef Documentation

typedef Field::Element Element
 


Constructor & Destructor Documentation

GenericRandIter const Field   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.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.

Parameters:
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)

GenericRandIter const GenericRandIter< Field > &    R [inline]
 

~GenericRandIter   [inline]
 


Member Function Documentation

GenericRandIter<Field>& operator= const GenericRandIter< Field > &    R [inline]
 

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

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.

Returns:
reference to random field element


Generated on Mon Jun 20 09:16:52 2005 for linbox by doxygen1.2.18