linbox
|
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... | |
Public Member Functions | |
Object Management | |
ElementAbstract & | init (ElementAbstract &x) const |
Initialization of field base element from an integer. More... | |
Arithmetic Operations | |
x <- y op z; x <- op y These operations require all elements, including x, to be initialized before the operation is called. Uninitialized field base elements will give undefined results. | |
ElementAbstract & | axmy (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x, const ElementAbstract &y) const |
Natural AXMY. More... | |
ElementAbstract & | maxpy (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x, const ElementAbstract &y) const |
Natural MAXPY. More... | |
Inplace Arithmetic Operations | |
x <- x op y; x <- op x | |
bool | isMOne (const ElementAbstract &x) const |
MOne equality. More... | |
ElementAbstract & | axmyin (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x) const |
Inplace AXMY. More... | |
ElementAbstract & | maxpyin (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x) const |
Inplace MAXPY. 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... | |
FieldAbstract * | clone () const |
Virtual copy constructor. More... | |
RingAbstract & | operator= (const RingAbstract &F) |
Assignment operator. More... | |
FieldAbstract & | operator= (const FieldAbstract &F) |
Assignment operator. More... | |
ElementAbstract & | init (ElementAbstract &x, const integer &y=0) const |
Default constructor. More... | |
integer & | convert (integer &x, const ElementAbstract &y) const |
Default constructor. More... | |
ElementAbstract & | assign (ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. More... | |
ElementAbstract & | neg (ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. More... | |
ElementAbstract & | inv (ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. More... | |
ElementAbstract & | negin (ElementAbstract &x) const |
Default constructor. More... | |
ElementAbstract & | invin (ElementAbstract &x) const |
Default constructor. More... | |
integer & | cardinality (integer &c) const |
Default constructor. More... | |
integer & | characteristic (integer &c) const |
Default constructor. More... | |
bool | areEqual (const ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. More... | |
ElementAbstract & | add (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
Default constructor. More... | |
ElementAbstract & | sub (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
Default constructor. More... | |
ElementAbstract & | mul (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
Default constructor. More... | |
ElementAbstract & | div (ElementAbstract &x, const ElementAbstract &y, const ElementAbstract &z) const |
Default constructor. More... | |
ElementAbstract & | axpy (ElementAbstract &r, const ElementAbstract &a, const ElementAbstract &x, const ElementAbstract &y) const |
Default constructor. More... | |
ElementAbstract & | addin (ElementAbstract &x, const ElementAbstract &z) const |
Default constructor. More... | |
ElementAbstract & | subin (ElementAbstract &x, const ElementAbstract &z) const |
Default constructor. More... | |
ElementAbstract & | mulin (ElementAbstract &x, const ElementAbstract &z) const |
Default constructor. More... | |
ElementAbstract & | divin (ElementAbstract &x, const ElementAbstract &z) const |
Default constructor. More... | |
ElementAbstract & | axpyin (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... | |
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.
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.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Constructor from ring to be wrapped.
F | Ring object to be wrapped. |
|
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. |
|
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.
Implements FieldAbstract.
|
inline |
Assignment operator.
Required by abstract base class.
F | constant reference to RingAbstract object |
|
inlinevirtual |
Assignment operator.
Required by abstract base class.
F | constant reference to RingAbstract object |
Implements FieldAbstract.
|
inlinevirtual |
Default constructor.
In this implementation, this means copying the ring E._field
.
Implements FieldAbstract.
|
inlinevirtual |
Default constructor.
In this implementation, this means copying the ring E._field
.
Implements FieldAbstract.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
Default constructor.
In this implementation, this means copying the ring E._field
.
Implements FieldAbstract.
Default constructor.
In this implementation, this means copying the ring E._field
.
Implements FieldAbstract.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inlinevirtual |
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.
|
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.
x | ring element. |
Implements RingAbstract.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inline |
Default constructor.
In this implementation, this means copying the ring E._field
.
|
inlineinherited |
Initialization of field base element from an integer.
Behaves like C++ allocator construct. This function assumes the output field base element x has already been constructed, but that it is not already initialized. This is not a specialization of the template function because such a specialization is not allowed inside the class declaration.
x | field base element to contain output (reference returned). |
y | integer. |
|
inlineinherited |
Natural AXMY.
r = a * x - y This function assumes all field elements have already been constructed and initialized.
r | field element (reference returned). |
a | field element. |
x | field element. |
y | field element. |
|
inlineinherited |
Natural MAXPY.
r = y - a * x This function assumes all field elements have already been constructed and initialized.
r | field element (reference returned). |
a | field element. |
x | field element. |
y | field element. |
|
inlineinherited |
MOne equality.
Test if field base element is equal to one. This function assumes the field base element has already been constructed and initialized.
x | field base element. |
|
inlineinherited |
Inplace AXMY.
r = a * x - r This function assumes all field elements have already been constructed and initialized.
r | field element (reference returned). |
a | field element. |
x | field element. |
|
inlineinherited |
Inplace MAXPY.
r -= a * x This function assumes all field elements have already been constructed and initialized.
r | field element (reference returned). |
a | field element. |
x | field element. |
|
friend |
Default constructor.
In this implementation, this means copying the ring E._field
.