Givaro
GIV_ExtensionrandIter< ExtensionField, Type > Class Template Reference

Extension rand iters. More...

#include <extension.h>

Common Object Interface.

These methods are required of all LinBox random field Element generators.

typedef ExtensionField::PolElement Element
 Field Element type. More...
 
typedef ExtensionField::Residu_t Residu_t
 Field Element type. More...
 
 GIV_ExtensionrandIter (const ExtensionField &F, const Type &size=0, const Type &seed=0)
 Constructor from field, sampling size, and seed. More...
 
 GIV_ExtensionrandIter (const GIV_ExtensionrandIter &R)
 Copy constructor. More...
 
 ~GIV_ExtensionrandIter (void)
 Destructor. More...
 
Elementrandom (Element &elt) const
 Random field Element creator with assignement. More...
 
Elementoperator() (Element &elt) const
 Random field Element creator with assignement. More...
 
Elementoperator() (void)
 Random field Element creator. More...
 
const ExtensionField & ring ()
 Field Element type. More...
 

Detailed Description

template<class ExtensionField, class Type>
class Givaro::GIV_ExtensionrandIter< ExtensionField, Type >

Extension rand iters.

Member Typedef Documentation

◆ Element

typedef ExtensionField::PolElement Element

Field Element type.

The field Element must contain a default constructor, a copy constructor, a destructor, and an assignment operator.

◆ Residu_t

typedef ExtensionField::Residu_t Residu_t

Field Element type.

The field Element must contain a default constructor, a copy constructor, a destructor, and an assignment operator.

Constructor & Destructor Documentation

◆ GIV_ExtensionrandIter() [1/2]

GIV_ExtensionrandIter ( const ExtensionField &  F,
const Type &  size = 0,
const Type &  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()). 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. This implementation sets the sampling size to be no more than the cardinality of the field.

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

◆ GIV_ExtensionrandIter() [2/2]

GIV_ExtensionrandIter ( const GIV_ExtensionrandIter< ExtensionField, Type > &  R)
inline

Copy constructor.

Constructs ALP_randIter object by copying the random field Element generator. This is required to allow generator objects to be passed by value into functions. In this implementation, this means copying the random field Element generator to which R._randIter_ptr points.

Parameters
RALP_randIter object.

◆ ~GIV_ExtensionrandIter()

~GIV_ExtensionrandIter ( void  )
inline

Destructor.

This destructs the random field Element generator object. In this implementation, this destroys the generator by deleting the random generator object to which _randIter_ptr points.

Member Function Documentation

◆ random()

Element& random ( Element elt) const
inline

Random field Element creator with assignement.

This returns a random field Element from the information supplied at the creation of the generator.

Returns
random field Element

◆ operator()() [1/2]

Element& operator() ( Element elt) const
inline

Random field Element creator with assignement.

This returns a random field Element from the information supplied at the creation of the generator.

Returns
random field Element

◆ operator()() [2/2]

Element& operator() ( void  )
inline

Random field Element creator.

This returns a random field Element from the information supplied at the creation of the generator.

Returns
random field Element

◆ ring()

const ExtensionField& ring ( )
inline

Field Element type.

The field Element must contain a default constructor, a copy constructor, a destructor, and an assignment operator.


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