Package gmp

Class MpzRef

All Implemented Interfaces:
Serializable, Cloneable, Comparable<Mpz>

public class MpzRef extends Mpz
Class of references to numerators and denominator of Mpq objects.

A mpq_t GMP C object contains a numerator and a denominator which are themselves mpz_t GMP C objects and can be manipulated independently. The MpzRef class proposes a similar interface for Java. A MpzRef to reference the numerator or the denominator of a Mpq object can be obtained using the Mpq.numRef() and Mpq.denRef() methods. The MpzRef can then be manipulated exactly as a Mpz, from which it inherits all methods. This allows manipulating Mpq numerators and denominators in-place, without requiring any copy.

MpzRef cannot be serialized as it represents a reference to a part of a larger object.

See Also: