#include <archetype.h>
Inheritance diagram for RingArchetype:
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.
Public Types | |
Common Object Interface for a LinBox Ring. | |
typedef FieldArchetype::Element | Element |
element type. | |
typedef FieldArchetype::RandIter | RandIter |
Random iterator generator type. | |
Public Member Functions | |
Object Management | |
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 { } 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) |
|
Copy constructor. Constructs RingArchetype 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 to which { F.} points, the element to which { F.} points, and the random element generator to which { F.} points.
|
|
Constructor. Constructs ring from pointer to {RingAbstract} and its encapsulated element and random element generator. Not part of the interface. Creates new copies of ring, element, and random iterator generator objects in dynamic memory.
|
|
Constructor. Constructs ring from ANYTHING matching the interface using the enveloppe as a {RingAbstract} and its encapsulated element and random element generator if needed.
|
|
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 { } of x exists and does not point to null.
|
|
Divisibility of zero test. Test if ring element is a zero divisor. This function assumes the ring element has already been constructed and initialized. In this implementation, this means the { } of x exists and does not point to null.
|