linbox
|
elements of GMP_Rationals. More...
#include <gmp-rational.h>
Public Member Functions | |
Common Object Interface for LinBox Field elements. | |
GMPRationalElement (void) | |
Default constructor. More... | |
GMPRationalElement (const GMPRationalElement &a) | |
Copy constructor. More... | |
~GMPRationalElement () | |
Destructor. More... | |
GMPRationalElement & | operator= (const GMPRationalElement &a) |
Assignment operator. More... | |
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) | |
Constructor. More... | |
GMPRationalElement (const integer &num, const integer &den) | |
Constructor. More... | |
GMPRationalElement (const integer &num) | |
Constructor. More... | |
mpq_ptr | get_rep () |
access representation | |
elements of GMP_Rationals.
|
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.
|
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.
a | field element. |
|
inline |
Destructor.
In this implementation, this destroys element by deleting field element to which _elem_ptr points.
|
inline |
Constructor.
Constructs field element from an mpq_t Not part of the interface. Creates new copy of element object in dynamic memory.
_rep | pointer to ElementAbstract |
|
inline |
Constructor.
Initialize from numerator and denominator
num,den |
|
inline |
Constructor.
Initalizes from a single integer, (which is assumed to be the numerator, with the denominator being 1)
num |
|
inline |
Assignment operator.
Assigns element a to element. In this implementation, this is done by copying field element to which _elem_ptr points.
a | field element. |