linbox
Public Types | Protected Attributes
RingEnvelope< Field > Class Template Referenceabstract

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

#include <envelope.h>

+ Inheritance diagram for RingEnvelope< Field >:

Public Types

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

Public Member Functions

Inplace Arithmetic Operations

x <- x op y; x <- op x

virtual bool isMOne (const Element &x) const =0
 MOne equality. More...
 
Inplace Arithmetic Operations

x <- x op y; x <- op x

bool isMOne (const ElementAbstract &x) const
 MOne equality. More...
 

Protected Attributes

Ring _field
 Wrapped field.
 

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 Field>
class LinBox::RingEnvelope< Field >

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

typedef FieldEnvelope<Ring>::Element Element

element type.

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

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 ( void  )
inline

Default constructor.

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

RingEnvelope ( const Ring &  F)
inline

Constructor from ring to be wrapped.

Parameters
FRing object to be wrapped.
RingEnvelope ( const RingEnvelope< Field > &  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

FieldAbstract* clone ( ) const
inlinevirtual

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.

Implements FieldAbstract.

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
FieldAbstract& operator= ( const FieldAbstract F)
inlinevirtual

Assignment operator.

Required by abstract base class.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

ElementAbstract& negin ( ElementAbstract x) const
inlinevirtual

Default constructor.

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

Implements FieldAbstract.

ElementAbstract& invin ( ElementAbstract x) const
inlinevirtual

Default constructor.

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

Implements FieldAbstract.

integer& cardinality ( integer c) const
inlinevirtual

Default constructor.

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

Implements FieldAbstract.

integer& characteristic ( integer c) const
inlinevirtual

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

bool isZero ( const ElementAbstract x) const
inlinevirtual

Default constructor.

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

Implements FieldAbstract.

bool isOne ( const ElementAbstract x) const
inlinevirtual

Default constructor.

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

Implements FieldAbstract.

bool isUnit ( const ElementAbstract x) const
inlinevirtual

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.

Implements RingAbstract.

bool isZeroDivisor ( const ElementAbstract x) const
inlinevirtual

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.

Implements RingAbstract.

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

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

Default constructor.

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

Implements FieldAbstract.

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

Default constructor.

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

Implements FieldAbstract.

virtual bool isMOne ( const Element x) const
pure virtualinherited

MOne equality.

Test if field element is equal to one. This function assumes the field element has already been constructed and initialized. Purely virtual.

Returns
boolean true if equals one, false if not.
Parameters
xfield element.

Implemented in FieldEnvelope< Field >, and FieldEnvelope< Ring >.

bool isMOne ( const ElementAbstract x) const
inlinevirtualinherited

MOne equality.

Test if field base element is equal to one. This function assumes the field base element has already been constructed and initialized.

Returns
boolean true if equals one, false if not.
Parameters
xfield base element.

Implements FieldAbstract.

Friends And Related Function Documentation

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: