Class BigQuaternionInteger
java.lang.Object
edu.jas.arith.BigQuaternion
edu.jas.arith.BigQuaternionInteger
- All Implemented Interfaces:
AbelianGroupElem<BigQuaternion>, Element<BigQuaternion>, GcdRingElem<BigQuaternion>, MonoidElem<BigQuaternion>, RingElem<BigQuaternion>, StarRingElem<BigQuaternion>, Serializable, Comparable<BigQuaternion>
Integer BigQuaternion class based on BigRational implementing the RingElem
interface and with the familiar MAS static method names. Objects of this
class are immutable. The integer quaternion methods are implemented after
https://de.wikipedia.org/wiki/Hurwitzquaternion see also
https://en.wikipedia.org/wiki/Hurwitz_quaternion
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for a BigQuaternion with no arguments.BigQuaternionInteger(BigQuaternionRing fac, long r) Constructor for a BigQuaternion from long.Constructor for a BigQuaternion from BigComplex.Constructor for a BigQuaternionInteger from BigQuaternion.Constructor for a BigQuaternion from BigRationals.Constructor for a BigQuaternion from BigRationals.BigQuaternionInteger(BigQuaternionRing fac, BigRational r, BigRational i, BigRational j) Constructor for a BigQuaternion from BigRationals.BigQuaternionInteger(BigQuaternionRing fac, BigRational r, BigRational i, BigRational j, BigRational k) Constructor for a BigQuaternion from BigRationals.The BigQuaternion string constructor accepts the following formats: empty string, "rational", or "rat i rat j rat k rat" with no blanks around i, j or k if used as polynoial coefficient. -
Method Summary
Modifier and TypeMethodDescriptionabs()Quaternion number absolute value.copy()Clone this.BigQuaternion right divide.BigQuaternion divide.BigQuaternion extended greatest common divisor.factory()Get the corresponding element factory.gcd(BigQuaternion S) Quaternion number greatest common divisor.inverse()BigQuaternion inverse.booleanisPrime()Quaternion number test if it is a prime number.BigQuaternion left divide.Integer quaternion number left greatest common divisor.Integral quotient and remainder by left division of this by S.Left remainder.static BigQuaternionQuaternion number inverse.static BigQuaternionQQ(BigQuaternion A, BigQuaternion B) Quaternion number quotient.Quotient and remainder by division of this by S.BigQuaternion remainder.BigQuaternion right divide.Integer quaternion number right greatest common divisor.Integral quotient and remainder by right division of this by S.Right remainder.Methods inherited from class BigQuaternion
bitLength, ceil, compareTo, conjugate, equals, floor, getIm, getJm, getKm, getRe, hashCode, isEntier, isIMAG, isONE, isQONE, isQZERO, isUnit, isZERO, multiply, multiply, multiplyLeft, negate, norm, QABS, QCON, QDIF, QNEG, QPROD, QSUM, roundToHurwitzian, roundToLipschitzian, signum, subtract, sum, toScript, toScriptFactory, toStringMethods inherited from interface MonoidElem
power, twosidedDivide, twosidedRemainder
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
BigQuaternionInteger
public BigQuaternionInteger(BigQuaternionRing fac, BigRational r, BigRational i, BigRational j, BigRational k) Constructor for a BigQuaternion from BigRationals.- Parameters:
fac- BigQuaternionRing.r- BigRational.i- BigRational.j- BigRational.k- BigRational.
-
BigQuaternionInteger
Constructor for a BigQuaternion from BigRationals.- Parameters:
fac- BigQuaternionRing.r- BigRational.i- BigRational.j- BigRational.
-
BigQuaternionInteger
Constructor for a BigQuaternion from BigRationals.- Parameters:
fac- BigQuaternionRing.r- BigRational.i- BigRational.
-
BigQuaternionInteger
Constructor for a BigQuaternion from BigRationals.- Parameters:
fac- BigQuaternionRing.r- BigRational.
-
BigQuaternionInteger
Constructor for a BigQuaternion from BigComplex.- Parameters:
fac- BigQuaternionRing.r- BigComplex.
-
BigQuaternionInteger
Constructor for a BigQuaternionInteger from BigQuaternion.- Parameters:
fac- BigQuaternionRing.q- BigQuaternion.
-
BigQuaternionInteger
Constructor for a BigQuaternion from long.- Parameters:
fac- BigQuaternionRing.r- long.
-
BigQuaternionInteger
Constructor for a BigQuaternion with no arguments.- Parameters:
fac- BigQuaternionRing.
-
BigQuaternionInteger
The BigQuaternion string constructor accepts the following formats: empty string, "rational", or "rat i rat j rat k rat" with no blanks around i, j or k if used as polynoial coefficient.- Parameters:
fac- BigQuaternionRing.s- String.- Throws:
NumberFormatException
-
-
Method Details
-
factory
Get the corresponding element factory.- Specified by:
factoryin interfaceElement<BigQuaternion>- Overrides:
factoryin classBigQuaternion- Returns:
- factory for this Element.
- See Also:
-
copy
Clone this.- Specified by:
copyin interfaceElement<BigQuaternion>- Overrides:
copyin classBigQuaternion- Returns:
- Creates and returns a copy of this Element.
- See Also:
-
abs
Quaternion number absolute value.- Specified by:
absin interfaceAbelianGroupElem<BigQuaternion>- Overrides:
absin classBigQuaternion- Returns:
- |this|**2. Note: returns the norm(this).
- See Also:
-
QINV
Quaternion number inverse.- Parameters:
A- is a non-zero quaternion number.- Returns:
- S with S * A = A * S = 1.
-
inverse
BigQuaternion inverse.- Specified by:
inversein interfaceMonoidElem<BigQuaternion>- Overrides:
inversein classBigQuaternion- Returns:
- S with S * this = this * S = 1.
- See Also:
-
remainder
BigQuaternion remainder.- Specified by:
remainderin interfaceMonoidElem<BigQuaternion>- Overrides:
remainderin classBigQuaternion- Parameters:
S- BigQuaternion.- Returns:
- this - this * b**(-1).
-
QQ
Quaternion number quotient.- Parameters:
A- BigQuaternion.B- BigQuaternion.- Returns:
- R * B**(-1).
-
divide
BigQuaternion right divide.- Specified by:
dividein interfaceMonoidElem<BigQuaternion>- Overrides:
dividein classBigQuaternion- Parameters:
b- BigQuaternion.- Returns:
- this * b**(-1).
-
rightDivide
BigQuaternion right divide.- Specified by:
rightDividein interfaceMonoidElem<BigQuaternion>- Overrides:
rightDividein classBigQuaternion- Parameters:
b- BigQuaternion.- Returns:
- this * b**(-1).
-
leftDivide
BigQuaternion left divide.- Specified by:
leftDividein interfaceMonoidElem<BigQuaternion>- Overrides:
leftDividein classBigQuaternion- Parameters:
b- BigQuaternion.- Returns:
- b**(-1) * this.
-
divide
BigQuaternion divide.- Overrides:
dividein classBigQuaternion- Parameters:
b- BigRational.- Returns:
- this/b.
-
quotientRemainder
Quotient and remainder by division of this by S.- Specified by:
quotientRemainderin interfaceMonoidElem<BigQuaternion>- Overrides:
quotientRemainderin classBigQuaternion- Parameters:
S- a quaternion number- Returns:
- [this*S**(-1), this - (this*S**(-1))*S].
-
gcd
Quaternion number greatest common divisor.- Specified by:
gcdin interfaceRingElem<BigQuaternion>- Overrides:
gcdin classBigQuaternion- Parameters:
S- BigQuaternion.- Returns:
- gcd(this,S).
-
egcd
BigQuaternion extended greatest common divisor.- Specified by:
egcdin interfaceRingElem<BigQuaternion>- Overrides:
egcdin classBigQuaternion- Parameters:
S- BigQuaternion.- Returns:
- [ gcd(this,S), a, b ] with a*this + b*S = gcd(this,S).
-
leftQuotientAndRemainder
Integral quotient and remainder by left division of this by S. This must be also an integral (Hurwitz) quaternion number.- Parameters:
b- an integral (Hurwitz) quaternion number- Returns:
- [round(b**(-1)) this, this - b * (round(b**(-1)) this)].
-
rightQuotientAndRemainder
Integral quotient and remainder by right division of this by S. This must be also an integral (Hurwitz) quaternion number.- Parameters:
b- an integral (Hurwitz) quaternion number- Returns:
- [this round(b**(-1)), this - this (round(b**(-1)) b)].
-
leftRemainder
Left remainder.- Specified by:
leftRemainderin interfaceMonoidElem<BigQuaternion>- Overrides:
leftRemainderin classBigQuaternion- Parameters:
a- element.- Returns:
- r = this - (a/left) * a, where left * a = this.
-
rightRemainder
Right remainder.- Specified by:
rightRemainderin interfaceMonoidElem<BigQuaternion>- Overrides:
rightRemainderin classBigQuaternion- Parameters:
a- element.- Returns:
- r = this - a * (a/right), where a * right = this.
-
leftGcd
Integer quaternion number left greatest common divisor.- Specified by:
leftGcdin interfaceRingElem<BigQuaternion>- Overrides:
leftGcdin classBigQuaternion- Parameters:
S- integer BigQuaternion.- Returns:
- leftGcd(this,S).
-
rightGcd
Integer quaternion number right greatest common divisor.- Specified by:
rightGcdin interfaceRingElem<BigQuaternion>- Overrides:
rightGcdin classBigQuaternion- Parameters:
S- integer BigQuaternion.- Returns:
- rightGcd(this,S).
-
isPrime
public boolean isPrime()Quaternion number test if it is a prime number.- Returns:
- isPrime(norm(this))
-