elements of GMP_Rationals.
More...
#include <gmp-rational.h>
elements of GMP_Rationals.
- Examples
- examples/qchar.C.
◆ GMPRationalElement() [1/5]
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() [2/5]
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
-
◆ ~GMPRationalElement()
Destructor.
In this implementation, this destroys element by deleting field element to which _elem_ptr points.
◆ GMPRationalElement() [3/5]
Constructor.
Constructs field element from an mpq_t Not part of the interface. Creates new copy of element object in dynamic memory.
- Parameters
-
◆ GMPRationalElement() [4/5]
Constructor.
Initialize from numerator and denominator
- Parameters
-
◆ GMPRationalElement() [5/5]
Constructor.
Initalizes from a single integer, (which is assumed to be the numerator, with the denominator being 1)
- Parameters
-
◆ operator=()
Assignment operator.
Assigns element a to element. In this implementation, this is done by copying field element to which _elem_ptr points.
- Parameters
-
◆ GMPRationalField
friend class GMPRationalField |
|
friend |
Constructor.
Constructs field element from an mpq_t Not part of the interface. Creates new copy of element object in dynamic memory.
- Parameters
-
◆ GMPRationalRandIter
friend class GMPRationalRandIter |
|
friend |
Constructor.
Constructs field element from an mpq_t Not part of the interface. Creates new copy of element object in dynamic memory.
- Parameters
-
The documentation for this class was generated from the following file: