Main Page | Modules | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

RingArchetype Class Reference
[linbox/ring]

#include <archetype.h>

Inheritance diagram for RingArchetype:

FieldArchetype FieldInterface List of all members.

Detailed Description

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.


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
These methods are required of all {LinBox} rings.

 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)


Constructor & Destructor Documentation

RingArchetype const RingArchetype F  )  [inline]
 

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.

Parameters:
F { RingArchetype} object.

RingArchetype RingAbstract ring_ptr,
ElementAbstract elem_ptr,
RandIterAbstract randIter_ptr = 0
[inline]
 

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.

Parameters:
ring\_ptr pointer to {RingAbstract}.
elem\_ptr pointer to {ElementAbstract}, which is the encapsulated element of {RingAbstract}.
randIter\_ptr pointer to {RandIterAbstract}, which is the encapsulated random iterator generator of {RingAbstract}.

RingArchetype Ring_qcq *  f  )  [inline]
 

Constructor. Constructs ring from ANYTHING matching the interface using the enveloppe as a {RingAbstract} and its encapsulated element and random element generator if needed.

Parameters:
ring\_ptr pointer to ring matching the interface
elem\_ptr pointer to element matching the interface
randIter\_ptr pointer to random matching the interface


Member Function Documentation

bool isUnit const Element x  )  const [inline]
 

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.

Returns:
boolean true if equals zero, false if not.
Parameters:
x ring element.

bool isZeroDivisor const Element x  )  const [inline]
 

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.

Returns:
boolean true if divides zero, false if not.
Parameters:
x ring element.


The documentation for this class was generated from the following file:
Generated on Thu Feb 8 22:33:06 2007 for linbox by doxygen 1.3.4