linbox
Public Types | Protected Attributes
RingEnvelope< Ring > Class Template Reference

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

#include <envelope.h>

+ Inheritance diagram for RingEnvelope< Ring >:

Public Types

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

Protected Attributes

Ring _field
 Wrapped field.

Object Management

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

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

typedef FieldEnvelope<Ring>::Element Element

element type.

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

Reimplemented from RingAbstract.

Random iterator generator type.

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

Reimplemented from RingAbstract.


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< 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

FieldAbstract* clone ( ) const [inline, virtual]

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.

Reimplemented from FieldEnvelope< Ring >.

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) [inline, virtual]

Assignment operator.

Required by abstract base class.

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

Reimplemented from FieldEnvelope< Ring >.

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

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

integer& convert ( integer x,
const ElementAbstract y 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& assign ( ElementAbstract x,
const ElementAbstract y 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& neg ( ElementAbstract x,
const ElementAbstract y 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& inv ( ElementAbstract x,
const ElementAbstract y 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& negin ( ElementAbstract x) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& invin ( ElementAbstract x) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

integer& cardinality ( integer c) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

integer& characteristic ( integer c) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

bool areEqual ( const ElementAbstract x,
const ElementAbstract y 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& add ( ElementAbstract x,
const ElementAbstract y,
const ElementAbstract z 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& sub ( ElementAbstract x,
const ElementAbstract y,
const ElementAbstract z 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& mul ( ElementAbstract x,
const ElementAbstract y,
const ElementAbstract z 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& div ( ElementAbstract x,
const ElementAbstract y,
const ElementAbstract z 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

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

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& addin ( ElementAbstract x,
const ElementAbstract z 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& subin ( ElementAbstract x,
const ElementAbstract z 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& mulin ( ElementAbstract x,
const ElementAbstract z 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& divin ( ElementAbstract x,
const ElementAbstract z 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

ElementAbstract& axpyin ( ElementAbstract r,
const ElementAbstract x,
const ElementAbstract y 
) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

bool isZero ( const ElementAbstract x) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

bool isOne ( const ElementAbstract x) const [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

bool isUnit ( const ElementAbstract x) const [inline, virtual]

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 [inline, virtual]

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 [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

std::istream& read ( std::istream &  is) [inline, virtual]

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

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

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.

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

Default constructor.

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

Reimplemented from FieldEnvelope< Ring >.


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: