linbox
1
|
elements of GMP_Rationals. More...
#include <gmp-rational.h>
Public Member Functions | |
Common Object Interface for LinBox Field elements. | |
GMPRationalElement (void) | |
GMPRationalElement (const GMPRationalElement &a) | |
~GMPRationalElement () | |
GMPRationalElement & | operator= (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) | |
mpq_ptr | get_rep () |
elements of GMP_Rationals.
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.
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.
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)
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.
a | field element. |