Public Member Functions |
|
| RingArchetype (const RingArchetype &F) |
bool | isUnit (const Element &x) const |
| Invertibility test. Test if ring element is invertible. This function assumes the ring element has already been constructed and initialized. In this implementation, this means the { _elem_ptr} of x exists and does not point to null.
|
bool | isZeroDivisor (const Element &x) const |
| RingArchetype (RingAbstract *ring_ptr, ElementAbstract *elem_ptr, RandIterAbstract *randIter_ptr=0) |
template<class Ring_qcq > |
| RingArchetype (Ring_qcq *f) |
| FieldArchetype (const FieldArchetype &F) |
| Copy constructor.
|
| ~FieldArchetype (void) |
| Destructor.
|
FieldArchetype & | operator= (const FieldArchetype &F) |
| Assignment operator.
|
Element & | init (Element &x, const integer &n=0) const |
| Initialization of field element from an integer.
|
integer & | convert (integer &n, const Element &y=0) const |
| Conversion of field element to an integer.
|
Element & | assign (Element &x, const Element &y) const |
| Assignment of one field element to another.
|
integer & | cardinality (integer &c) const |
| Cardinality.
|
integer & | characteristic (integer &c) const |
| Characteristic.
|
bool | areEqual (const Element &x, const Element &y) const |
| Equality of two elements.
|
Element & | add (Element &x, const Element &y, const Element &z) const |
| Addition, x <– y + z.
|
Element & | sub (Element &x, const Element &y, const Element &z) const |
| Subtraction, x <– y - z.
|
Element & | mul (Element &x, const Element &y, const Element &z) const |
| Multiplication, x <– y * z.
|
Element & | div (Element &x, const Element &y, const Element &z) const |
Element & | neg (Element &x, const Element &y) const |
| Additive Inverse (Negation), x <– - y.
|
Element & | inv (Element &x, const Element &y) const |
| Multiplicative Inverse, x <– 1 / y.
|
Element & | axpy (Element &r, const Element &a, const Element &x, const Element &y) const |
| Field element AXPY, r <– a * x + y.
|
bool | isZero (const Element &x) const |
bool | isOne (const Element &x) const |
Element & | addin (Element &x, const Element &y) const |
Element & | subin (Element &x, const Element &y) const |
Element & | mulin (Element &x, const Element &y) const |
Element & | divin (Element &x, const Element &y) const |
Element & | negin (Element &x) const |
Element & | invin (Element &x) const |
Element & | axpyin (Element &r, const Element &a, const Element &x) const |
std::ostream & | write (std::ostream &os) const |
std::istream & | read (std::istream &is) |
std::ostream & | write (std::ostream &os, const Element &x) const |
std::istream & | read (std::istream &is, Element &x) const |
| FieldArchetype (FieldAbstract *field_ptr, ElementAbstract *elem_ptr, RandIterAbstract *randIter_ptr=0) |
template<class Field_qcq > |
| FieldArchetype (Field_qcq *f) |
specification and archetypic instance for the ring interface
The {RingArchetype} and its encapsulated element class contain pointers to the {RingAbstract} and its encapsulated ring element, respectively. {RingAbstract} then uses virtual member functions to define operations on its encapsulated ring element. This ring element has no knowledge of the ring properties being used on it which means the ring object must supply these operations.
It does not contain elements zero and one because they can be created whenever necessary, although it might be beneficial from an efficiency stand point to include them. However, because of archetype use three, the elements themselves cannot be contained, but rather pointers to them.