Givaro
|
Random ring Element generator. More...
#include <givranditer.h>
Common Object Interface. | |
These methods are required of all LinBox random ring Element generators. | |
typedef Ring::Element | Element |
Ring Element type. More... | |
typedef Ring::Residu_t | Residu_t |
Ring Element type. More... | |
ModularRandIter (const Ring &F, const uint64_t seed=0, const Residu_t size=0) | |
Constructor from ring, sampling size, and seed. More... | |
ModularRandIter (const ModularRandIter &R) | |
Copy constructor. More... | |
~ModularRandIter (void) | |
Destructor. More... | |
ModularRandIter< Ring > & | operator= (const ModularRandIter< Ring > &R) |
Assignment operator. More... | |
Element & | operator() (Element &elt) const |
Random ring Element creator with assignement. More... | |
Element & | random (Element &elt) const |
Ring Element type. More... | |
Element | operator() () const |
Ring Element type. More... | |
Element | random () const |
Ring Element type. More... | |
Implementation-Specific Methods. | |
const Ring & | ring () const |
Random generator. More... | |
Random ring Element generator.
This class defines a ring Element generator for all givaro modular rings (Gfq and Modular) throught a template argument as a ring. The random generator used is the givrandom.
typedef Ring::Element Element |
Ring Element type.
The ring Element must contain a default constructor, a copy constructor, a destructor, and an assignment operator.
typedef Ring::Residu_t Residu_t |
Ring Element type.
The ring Element must contain a default constructor, a copy constructor, a destructor, and an assignment operator.
|
inline |
Constructor from ring, sampling size, and seed.
The random ring Element iterator works in the ring F, is seeded by seed, and it returns any one Element with probability no more than 1/min(F.cardinality()). size has no meaning in ModularRandIter. A seed of zero means to use some arbitrary seed for the generator.
F | LinBox ring archetype object in which to do arithmetic |
seed | constant integer reference from which to seed random number generator (default = 0) |
|
inline |
Copy constructor.
Constructs ALP_randIter object by copying the random ring Element generator. This is required to allow generator objects to be passed by value into functions. In this implementation, this means copying the random ring Element generator to which R._randIter_ptr points.
R | ALP_randIter object. |
|
inline |
Destructor.
This destructs the random ring Element generator object. In this implementation, this destroys the generator by deleting the random generator object to which _randIter_ptr points.
|
inline |
Assignment operator.
Assigns ALP_randIter object R to generator. In this implementation, this means copying the generator to which R._randIter_ptr points.
R | ALP_randIter object. |
Random ring Element creator with assignement.
This returns a random ring Element from the information supplied at the creation of the generator.
Ring Element type.
The ring Element must contain a default constructor, a copy constructor, a destructor, and an assignment operator.
|
inline |
Ring Element type.
The ring Element must contain a default constructor, a copy constructor, a destructor, and an assignment operator.
|
inline |
Ring Element type.
The ring Element must contain a default constructor, a copy constructor, a destructor, and an assignment operator.
|
inline |
Random generator.