Class Quotient<C extends RingElem<C>>
java.lang.Object
edu.jas.poly.Quotient<C>
- All Implemented Interfaces:
AbelianGroupElem<Quotient<C>>, Element<Quotient<C>>, MonoidElem<Quotient<C>>, QuotPair<C>, RingElem<Quotient<C>>, Serializable, Comparable<Quotient<C>>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final booleanfinal CDenominator part of the element data structure.private static final org.apache.logging.log4j.Loggerfinal CNumerator part of the element data structure.final QuotientRing<C> Quotient class factory data structure. -
Constructor Summary
ConstructorsModifierConstructorDescriptionQuotient(QuotientRing<C> r) The constructor creates a Quotient object from a ring factory.Quotient(QuotientRing<C> r, C n) The constructor creates a Quotient object from a ring factory and a numerator element.Quotient(QuotientRing<C> r, C n, C d) The constructor creates a Quotient object from a ring factory and a numerator and denominator element.protectedQuotient(QuotientRing<C> r, C n, C d, boolean isred) The constructor creates a Quotient object from a ring factory and a numerator and denominator element. -
Method Summary
Modifier and TypeMethodDescriptionabs()Quotient absolute value.intQuotient comparison.copy()Clone this.Denominator.Quotient division.Extended greatest common divisor.booleanComparison with any other object.factory()Get the corresponding element factory.Greatest common divisor.inthashCode()Hash code for this local.inverse()Quotient inverse.booleanIs Quotient a constant.booleanisONE()Is Quotient one.booleanisUnit()Is Quotient unit.booleanisZERO()Is Quotient zero.monic()Quotient monic.Quotient multiplication.negate()Quotient negate.Numerator.Quotient and remainder by division of this by S.Quotient remainder.intsignum()Quotient signum.Quotient subtraction.Quotient summation.toScript()Get a scripting compatible string representation.Get a scripting compatible string representation of the factory.toString()Get the String representation as RingElem.Methods inherited from interface MonoidElem
leftDivide, leftRemainder, power, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug -
ring
Quotient class factory data structure. -
num
-
den
-
-
Constructor Details
-
Quotient
The constructor creates a Quotient object from a ring factory.- Parameters:
r- ring factory.
-
Quotient
The constructor creates a Quotient object from a ring factory and a numerator element. The denominator is assumed to be 1.- Parameters:
r- ring factory.n- numerator.
-
Quotient
The constructor creates a Quotient object from a ring factory and a numerator and denominator element.- Parameters:
r- ring factory.n- numerator.d- denominator.
-
Quotient
The constructor creates a Quotient object from a ring factory and a numerator and denominator element.- Parameters:
r- ring factory.n- numerator.d- denominator.isred- true if gcd(n,d) == 1, else false.
-
-
Method Details
-
factory
-
numerator
-
denominator
-
isConstant
public boolean isConstant()Is Quotient a constant. Not implemented.- Specified by:
isConstantin interfaceQuotPair<C extends RingElem<C>>
-
copy
-
isZERO
public boolean isZERO()Is Quotient zero.- Specified by:
isZEROin interfaceAbelianGroupElem<C extends RingElem<C>>- Returns:
- If this is 0 then true is returned, else false.
- See Also:
-
isONE
public boolean isONE()Is Quotient one.- Specified by:
isONEin interfaceMonoidElem<C extends RingElem<C>>- Returns:
- If this is 1 then true is returned, else false.
- See Also:
-
isUnit
public boolean isUnit()Is Quotient unit.- Specified by:
isUnitin interfaceMonoidElem<C extends RingElem<C>>- Returns:
- If this is a unit then true is returned, else false.
- See Also:
-
toString
-
toScript
-
toScriptFactory
-
compareTo
-
equals
-
hashCode
-
abs
-
sum
-
negate
-
signum
public int signum()Quotient signum.- Specified by:
signumin interfaceAbelianGroupElem<C extends RingElem<C>>- Returns:
- signum(this).
- See Also:
-
subtract
-
divide
-
inverse
-
remainder
-
quotientRemainder
Quotient and remainder by division of this by S.- Specified by:
quotientRemainderin interfaceMonoidElem<C extends RingElem<C>>- Parameters:
S- a Quotient- Returns:
- [this/S, this - (this/S)*S].
-
multiply
-
monic
-
gcd
-
egcd
-