Package gmp
Class MpzRef
java.lang.Object
gmp.Mpz
gmp.MpzRef
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<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:
-
Field Summary
Fields -
Method Summary
Methods inherited from class gmp.Mpz
abs, abs, add, add, add, add, addMul, addMul, and, and, bigIntegerValue, bin, bin, byteArrayValue, cdivQ, cdivQ, cdivQ, cdivQ, cdivQ2exp, cdivQR, cdivQR, cdivR, cdivR, cdivR, cdivR2exp, clrBit, cmp, cmp, cmp, cmpAbs, cmpAbs, cmpAbs, compareTo, divExact, divExact, divExact, divExact, doubleExponentValue, doubleValue, equals, fac, fdivQ, fdivQ, fdivQ, fdivQ, fdivQ2exp, fdivQR, fdivQR, fdivR, fdivR, fdivR, fdivR2exp, fib, fib, fitsInt, gcd, gcd, gcd, hamDist, hashCode, intValue, invert, isCongruent, isCongruent, isCongruent2exp, isDivisible, isDivisible, isDivisible2exp, isEqual, isEven, isOdd, isPerfectPower, isPerfectSquare, isPhysicalEqual, isProbabPrime, jacobi, kronecker, kronecker, kronecker, lcm, lcm, legendre, lucnum, lucnum, mod, mod, mod, mod, mul, mul, mul, mul, mul2exp, mul2exp, neg, neg, nextPrime, not, not, notBit, or, or, popCount, pow, pow, pow, pow, pow, random, randomBits, remove, remove, root, root, root, rRandomBits, scan0, scan1, set, set, set, set, set, set, set, setBit, sgn, size, sizeInBase, sqrt, sqrt, sqrt, sub, sub, sub, sub, sub, subMul, subMul, subRev, tdivQ, tdivQ, tdivQ, tdivQ, tdivQ2exp, tdivQR, tdivQR, tdivR, tdivR, tdivR, tdivR2exp, toString, toString, tstBit, xor, xor
-
Field Details
-
parent
We keep a pointer to the parentMpqobject so that it is not freed while a MpzRef on it is live.
-
-
Method Details
-
clone
MpzRef are not clonable.- Overrides:
clonein classMpz- Throws:
CloneNotSupportedException
-