Main Page | Modules | Namespace List | Class Hierarchy | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

GMPRationalElement Class Reference
[linbox/element]

#include <gmp-rational.h>


Detailed Description

elements of GMP_Rationals.


Public Member Functions

Common Object Interface for LinBox Field elements.
These methods are required of all {LinBox} field elements.

 GMPRationalElement (void)
 GMPRationalElement (const GMPRationalElement &a)
 ~GMPRationalElement ()
GMPRationalElementoperator= (const GMPRationalElement &a)
Implementation-Specific Methods.
These methods are not required of all LinBox field elements and are included only for this implementation of the archetype.

 GMPRationalElement (mpq_t _rep)
 GMPRationalElement (const integer &num, const integer &den)
 GMPRationalElement (const integer &num)


Constructor & Destructor Documentation

GMPRationalElement void   )  [inline]
 

Default constructor. This constructor is required to allow field elements to be primitive C++ types. Because constructor does not know what field the element belongs to, it cannot actually construct the element. In this implementation, the constructor it sets _elem_ptr to the null pointer. Initialization of the element is done through the field function init where the field is known.

GMPRationalElement const GMPRationalElement a  )  [inline]
 

Copy constructor. This constructor is required to allow field elements to be primitive C++ types, and to allow field elements to be passed by value into functions. Constructs field element by copying the field element. In this implementation, this means copying the element to which a._elem_ptr points.

Parameters:
a field element.

~GMPRationalElement  )  [inline]
 

Destructor. In this implementation, this destroys element by deleting field element to which _elem_ptr points.

GMPRationalElement mpq_t  _rep  )  [inline]
 

Constructor. Constructs field element from an mpq_t Not part of the interface. Creates new copy of element object in dynamic memory.

Parameters:
elem_ptr pointer to {ElementAbstract}

GMPRationalElement const integer num,
const integer den
[inline]
 

Constructor Initialize from numerator and denominator

GMPRationalElement const integer num  )  [inline]
 

Constructor Initalizes from a single integer, (which is assumed to be the numerator, with the denominator being 1)


Member Function Documentation

GMPRationalElement& operator= const GMPRationalElement a  )  [inline]
 

Assignment operator. Assigns element a to element. In this implementation, this is done by copying field element to which _elem_ptr points.

Parameters:
a field element.


Generated on Fri Jul 8 10:29:50 2005 for linbox by doxygen 1.3.7