linbox
Public Types
RingEnvelope< Ring > Class Template Reference

implement the ring archetype to minimize code bloat. More...

#include <envelope.h>

Public Types

typedef FieldEnvelope< Ring >::Element Element
 element type. More...
 
typedef FieldEnvelope< Ring >::RandIter RandIter
 Random iterator generator type. More...
 

Object Management

class RandIterEnvelope< Ring >
 Default constructor. More...
 
 RingEnvelope (void)
 Default constructor. More...
 
 RingEnvelope (const Ring &F)
 Constructor from ring to be wrapped. More...
 
 RingEnvelope (const RingEnvelope &E)
 Copy constructor. More...
 
FieldAbstractclone () const
 Virtual copy constructor. More...
 
RingAbstractoperator= (const RingAbstract &F)
 Assignment operator. More...
 
FieldAbstractoperator= (const FieldAbstract &F)
 Assignment operator. More...
 
ElementAbstractinit (ElementAbstract &x, const integer &y=0) const
 Default constructor. More...
 
integerconvert (integer &x, const ElementAbstract &y) const
 Default constructor. More...
 
ElementAbstractassign (ElementAbstract &x, const ElementAbstract &y) const
 Default constructor. More...
 
ElementAbstractneg (ElementAbstract &x, const ElementAbstract &y) const
 Default constructor. More...
 
ElementAbstractinv (ElementAbstract &x, const ElementAbstract &y) const
 Default constructor. More...
 
ElementAbstractnegin (ElementAbstract &x) const
 Default constructor. More...
 
ElementAbstractinvin (ElementAbstract &x) const
 Default constructor. More...
 
integercardinality (integer &c) const
 Default constructor. More...
 
integercharacteristic (integer &c) const
 Default constructor. More...
 
bool areEqual (const ElementAbstract &x, const ElementAbstract &y) const
 Default constructor. More...
 
ElementAbstractadd (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const
 Default constructor. More...
 
ElementAbstractsub (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const
 Default constructor. More...
 
ElementAbstractmul (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const
 Default constructor. More...
 
ElementAbstractdiv (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const
 Default constructor. More...
 
ElementAbstractaxpy (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x, const ElementAbstract &y) const
 Default constructor. More...
 
ElementAbstractaddin (ElementAbstract &x, const ElementAbstract &z) const
 Default constructor. More...
 
ElementAbstractsubin (ElementAbstract &x, const ElementAbstract &z) const
 Default constructor. More...
 
ElementAbstractmulin (ElementAbstract &x, const ElementAbstract &z) const
 Default constructor. More...
 
ElementAbstractdivin (ElementAbstract &x, const ElementAbstract &z) const
 Default constructor. More...
 
ElementAbstractaxpyin (ElementAbstract &r, const ElementAbstract &x, const ElementAbstract &y) const
 Default constructor. More...
 
bool isZero (const ElementAbstract &x) const
 Default constructor. More...
 
bool isOne (const ElementAbstract &x) const
 Default constructor. More...
 
bool isUnit (const ElementAbstract &x) const
 Invertibility test. More...
 
bool isZeroDivisor (const ElementAbstract &x) const
 Divisibility of zero test. More...
 
std::ostream & write (std::ostream &os) const
 Default constructor. More...
 
std::istream & read (std::istream &is)
 Default constructor. More...
 
std::ostream & write (std::ostream &os, const ElementAbstract &x) const
 Default constructor. More...
 
std::istream & read (std::istream &is, ElementAbstract &x) const
 Default constructor. More...
 

Detailed Description

template<class Ring>
class LinBox::RingEnvelope< Ring >

implement the ring archetype to minimize code bloat.

This class implements all purely virtual member functions of the abstract base class. This class is used to wrap a LinBox ring so that it might be used with the Ring archetype.

Member Typedef Documentation

◆ Element

element type.

It is derived from the class ElementAbstract, and it must contain a wrapped ring element.

◆ RandIter

Random iterator generator type.

It is derived from the class RandIterAbstract, and it must contain a wrapped ring random iterator generator.

Constructor & Destructor Documentation

◆ RingEnvelope() [1/3]

RingEnvelope ( void  )
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ RingEnvelope() [2/3]

RingEnvelope ( const Ring F)
inline

Constructor from ring to be wrapped.

Parameters
FRing object to be wrapped.

◆ RingEnvelope() [3/3]

RingEnvelope ( const RingEnvelope< Ring > &  E)
inline

Copy constructor.

Constructs RingEnvelope object by copying the ring. This is required to allow ring objects to be passed by value into functions. In this implementation, this means copying the ring E._field.

Parameters
ERingEnvelope object.

Member Function Documentation

◆ clone()

FieldAbstract* clone ( ) const
inline

Virtual copy constructor.

Required because constructors cannot be virtual. Passes construction on to derived classes. This function is not part of the common object interface.

Returns
pointer to new object in dynamic memory.

◆ operator=() [1/2]

RingAbstract& operator= ( const RingAbstract F)
inline

Assignment operator.

Required by abstract base class.

Returns
reference to RingAbstract object for self
Parameters
Fconstant reference to RingAbstract object

◆ operator=() [2/2]

FieldAbstract& operator= ( const FieldAbstract F)
inline

Assignment operator.

Required by abstract base class.

Returns
reference to RingAbstract object for self
Parameters
Fconstant reference to RingAbstract object

◆ init()

ElementAbstract& init ( ElementAbstract x,
const integer y = 0 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ convert()

integer& convert ( integer x,
const ElementAbstract y 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ assign()

ElementAbstract& assign ( ElementAbstract x,
const ElementAbstract y 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ neg()

ElementAbstract& neg ( ElementAbstract x,
const ElementAbstract y 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ inv()

ElementAbstract& inv ( ElementAbstract x,
const ElementAbstract y 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ negin()

ElementAbstract& negin ( ElementAbstract x) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ invin()

ElementAbstract& invin ( ElementAbstract x) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ cardinality()

integer& cardinality ( integer c) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ characteristic()

integer& characteristic ( integer c) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ areEqual()

bool areEqual ( const ElementAbstract x,
const ElementAbstract y 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ add()

ElementAbstract& add ( ElementAbstract x,
const ElementAbstract y,
const ElementAbstract z 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ sub()

ElementAbstract& sub ( ElementAbstract x,
const ElementAbstract y,
const ElementAbstract z 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ mul()

ElementAbstract& mul ( ElementAbstract x,
const ElementAbstract y,
const ElementAbstract z 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ div()

ElementAbstract& div ( ElementAbstract x,
const ElementAbstract y,
const ElementAbstract z 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ axpy()

ElementAbstract& axpy ( ElementAbstract r,
const ElementAbstract a,
const ElementAbstract x,
const ElementAbstract y 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ addin()

ElementAbstract& addin ( ElementAbstract x,
const ElementAbstract z 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ subin()

ElementAbstract& subin ( ElementAbstract x,
const ElementAbstract z 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ mulin()

ElementAbstract& mulin ( ElementAbstract x,
const ElementAbstract z 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ divin()

ElementAbstract& divin ( ElementAbstract x,
const ElementAbstract z 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ axpyin()

ElementAbstract& axpyin ( ElementAbstract r,
const ElementAbstract x,
const ElementAbstract y 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ isZero()

bool isZero ( const ElementAbstract x) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ isOne()

bool isOne ( const ElementAbstract x) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ isUnit()

bool isUnit ( const ElementAbstract x) const
inline

Invertibility test.

Test if ring element is invertible. This function assumes the ring element has already been constructed and initialized.

Returns
boolean true if equals zero, false if not.
Parameters
xring element.

◆ isZeroDivisor()

bool isZeroDivisor ( const ElementAbstract x) const
inline

Divisibility of zero test.

Test if ring element is a zero divisor. This function assumes the ring element has already been constructed and initialized.

Returns
boolean true if divides zero, false if not.
Parameters
xring element.

◆ write() [1/2]

std::ostream& write ( std::ostream &  os) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ read() [1/2]

std::istream& read ( std::istream &  is)
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ write() [2/2]

std::ostream& write ( std::ostream &  os,
const ElementAbstract x 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

◆ read() [2/2]

std::istream& read ( std::istream &  is,
ElementAbstract x 
) const
inline

Default constructor.

In this implementation, this means copying the ring E._field.

Friends And Related Function Documentation

◆ RandIterEnvelope< Ring >

friend class RandIterEnvelope< Ring >
friend

Default constructor.

In this implementation, this means copying the ring E._field.


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