linbox
|
implement the ring archetype to minimize code bloat. More...
#include <envelope.h>
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. | |
FieldAbstract * | clone () const |
Virtual copy constructor. | |
RingAbstract & | operator= (const RingAbstract &F) |
Assignment operator. | |
FieldAbstract & | operator= (const FieldAbstract &F) |
Assignment operator. | |
ElementAbstract & | init (ElementAbstract &x, const integer &y=0) const |
Default constructor. | |
integer & | convert (integer &x, const ElementAbstract &y) const |
Default constructor. | |
ElementAbstract & | assign (ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. | |
ElementAbstract & | neg (ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. | |
ElementAbstract & | inv (ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. | |
ElementAbstract & | negin (ElementAbstract &x) const |
Default constructor. | |
ElementAbstract & | invin (ElementAbstract &x) const |
Default constructor. | |
integer & | cardinality (integer &c) const |
Default constructor. | |
integer & | characteristic (integer &c) const |
Default constructor. | |
bool | areEqual (const ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. | |
ElementAbstract & | add (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
Default constructor. | |
ElementAbstract & | sub (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
Default constructor. | |
ElementAbstract & | mul (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
Default constructor. | |
ElementAbstract & | div (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
Default constructor. | |
ElementAbstract & | axpy (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. | |
ElementAbstract & | addin (ElementAbstract &x, const ElementAbstract &z) const |
Default constructor. | |
ElementAbstract & | subin (ElementAbstract &x, const ElementAbstract &z) const |
Default constructor. | |
ElementAbstract & | mulin (ElementAbstract &x, const ElementAbstract &z) const |
Default constructor. | |
ElementAbstract & | divin (ElementAbstract &x, const ElementAbstract &z) const |
Default constructor. | |
ElementAbstract & | axpyin (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. |
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.
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.
typedef FieldEnvelope<Ring>::RandIter RandIter |
Random iterator generator type.
It is derived from the class RandIterAbstract, and it must contain a wrapped ring random iterator generator.
Reimplemented from RingAbstract.
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.
F | Ring 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
.
E | RingEnvelope object. |
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.
Reimplemented from FieldEnvelope< Ring >.
RingAbstract& operator= | ( | const RingAbstract & | F | ) | [inline] |
Assignment operator.
Required by abstract base class.
F | constant reference to RingAbstract object |
FieldAbstract& operator= | ( | const FieldAbstract & | F | ) | [inline, virtual] |
Assignment operator.
Required by abstract base class.
F | constant 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.
x | ring 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.
x | ring 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 >.
friend class RandIterEnvelope< Ring > [friend] |
Default constructor.
In this implementation, this means copying the ring E._field
.