Package edu.jas.application
Class SolvableLocalResidue<C extends GcdRingElem<C>>
java.lang.Object
edu.jas.application.SolvableLocalResidue<C>
- All Implemented Interfaces:
AbelianGroupElem<SolvableLocalResidue<C>>,Element<SolvableLocalResidue<C>>,GcdRingElem<SolvableLocalResidue<C>>,MonoidElem<SolvableLocalResidue<C>>,QuotPair<GenPolynomial<C>>,RingElem<SolvableLocalResidue<C>>,Serializable,Comparable<SolvableLocalResidue<C>>
public class SolvableLocalResidue<C extends GcdRingElem<C>>
extends Object
implements GcdRingElem<SolvableLocalResidue<C>>, QuotPair<GenPolynomial<C>>
SolvableLocalResidue, that is a (left) rational function, based on pairs of
GenSolvablePolynomial with GcdRingElem interface. Objects of this class are
immutable.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final booleanfinal GenSolvablePolynomial<C> Denominator part of the element data structure.private static final org.apache.logging.log4j.Loggerfinal GenSolvablePolynomial<C> Numerator part of the element data structure.final SolvableLocalResidueRing<C> SolvableLocalResidue class factory data structure. -
Constructor Summary
ConstructorsModifierConstructorDescriptionThe constructor creates a SolvableLocalResidue object from a ring factory.The constructor creates a SolvableLocalResidue object from a ring factory and a numerator polynomial.SolvableLocalResidue(SolvableLocalResidueRing<C> r, GenSolvablePolynomial<C> n, GenSolvablePolynomial<C> d) The constructor creates a SolvableLocalResidue object from a ring factory and a numerator and denominator solvable polynomial.protectedSolvableLocalResidue(SolvableLocalResidueRing<C> r, GenSolvablePolynomial<C> n, GenSolvablePolynomial<C> d, boolean isred) The constructor creates a SolvableLocalResidue object from a ring factory and a numerator and denominator polynomial. -
Method Summary
Modifier and TypeMethodDescriptionabs()SolvableLocalResidue absolute value.intSolvableLocalResidue comparison.copy()Clone this.Denominator.SolvableLocalResidue division.Extended greatest common divisor.booleanComparison with any other object.factory()Get the corresponding element factory.gcd(SolvableLocalResidue<C> b) Greatest common divisor.inthashCode()Hash code for this element.inverse()SolvableLocalResidue inverse.booleanIs Quotient a constant.booleanisONE()Is SolvableLocalResidue one.booleanisUnit()Is SolvableLocalResidue a unit.booleanisZERO()Is SolvableLocalResidue zero.monic()SolvableLocalResidue monic.SolvableLocalResidue multiplication by coefficient.SolvableLocalResidue multiplication.SolvableLocalResidue multiplication by exponent.SolvableLocalResidue multiplication by GenSolvablePolynomial.negate()SolvableLocalResidue negate.Numerator.SolvableLocalResidue remainder.intsignum()SolvableLocalResidue signum.SolvableLocalResidue subtraction.sum(SolvableLocalResidue<C> S) SolvableLocalResidue 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 class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface edu.jas.structure.MonoidElem
leftDivide, leftRemainder, power, quotientRemainder, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug -
ring
SolvableLocalResidue class factory data structure. -
num
Numerator part of the element data structure. -
den
Denominator part of the element data structure.
-
-
Constructor Details
-
SolvableLocalResidue
The constructor creates a SolvableLocalResidue object from a ring factory.- Parameters:
r- ring factory.
-
SolvableLocalResidue
The constructor creates a SolvableLocalResidue object from a ring factory and a numerator polynomial. The denominator is assumed to be 1.- Parameters:
r- ring factory.n- numerator solvable polynomial.
-
SolvableLocalResidue
public SolvableLocalResidue(SolvableLocalResidueRing<C> r, GenSolvablePolynomial<C> n, GenSolvablePolynomial<C> d) The constructor creates a SolvableLocalResidue object from a ring factory and a numerator and denominator solvable polynomial.- Parameters:
r- ring factory.n- numerator polynomial.d- denominator polynomial.
-
SolvableLocalResidue
protected SolvableLocalResidue(SolvableLocalResidueRing<C> r, GenSolvablePolynomial<C> n, GenSolvablePolynomial<C> d, boolean isred) The constructor creates a SolvableLocalResidue object from a ring factory and a numerator and denominator polynomial.- Parameters:
r- ring factory.n- numerator polynomial.d- denominator polynomial.isred- unused at the moment.
-
-
Method Details
-
factory
Get the corresponding element factory.- Specified by:
factoryin interfaceElement<C extends GcdRingElem<C>>- Returns:
- factory for this Element.
- See Also:
-
numerator
Numerator.- Specified by:
numeratorin interfaceQuotPair<C extends GcdRingElem<C>>- See Also:
-
denominator
Denominator.- Specified by:
denominatorin interfaceQuotPair<C extends GcdRingElem<C>>- See Also:
-
copy
Clone this.- Specified by:
copyin interfaceElement<C extends GcdRingElem<C>>- Returns:
- Creates and returns a copy of this Element.
- See Also:
-
isZERO
public boolean isZERO()Is SolvableLocalResidue zero.- Specified by:
isZEROin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- If this is 0 then true is returned, else false.
- See Also:
-
isONE
public boolean isONE()Is SolvableLocalResidue one.- Specified by:
isONEin interfaceMonoidElem<C extends GcdRingElem<C>>- Returns:
- If this is 1 then true is returned, else false.
- See Also:
-
isUnit
public boolean isUnit()Is SolvableLocalResidue a unit.- Specified by:
isUnitin interfaceMonoidElem<C extends GcdRingElem<C>>- Returns:
- If this is a unit then true is returned, else false.
- See Also:
-
isConstant
public boolean isConstant()Is Quotient a constant.- Specified by:
isConstantin interfaceQuotPair<C extends GcdRingElem<C>>- Returns:
- true, if this has constant numerator and denominator, else false.
-
toString
Get the String representation as RingElem. -
toScript
Get a scripting compatible string representation.- Specified by:
toScriptin interfaceElement<C extends GcdRingElem<C>>- Returns:
- script compatible representation for this Element.
- See Also:
-
toScriptFactory
Get a scripting compatible string representation of the factory.- Specified by:
toScriptFactoryin interfaceElement<C extends GcdRingElem<C>>- Returns:
- script compatible representation for this ElemFactory.
- See Also:
-
compareTo
SolvableLocalResidue comparison.- Specified by:
compareToin interfaceComparable<C extends GcdRingElem<C>>- Specified by:
compareToin interfaceElement<C extends GcdRingElem<C>>- Parameters:
b- SolvableLocalResidue.- Returns:
- sign(this-b).
-
equals
Comparison with any other object. -
hashCode
public int hashCode()Hash code for this element. -
abs
SolvableLocalResidue absolute value.- Specified by:
absin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- the absolute value of this.
- See Also:
-
sum
SolvableLocalResidue summation.- Specified by:
sumin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableLocalResidue.- Returns:
- this+S.
-
negate
SolvableLocalResidue negate.- Specified by:
negatein interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- -this.
- See Also:
-
signum
public int signum()SolvableLocalResidue signum.- Specified by:
signumin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- signum(this).
- See Also:
-
subtract
SolvableLocalResidue subtraction.- Specified by:
subtractin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableLocalResidue.- Returns:
- this-S.
-
divide
SolvableLocalResidue division.- Specified by:
dividein interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableLocalResidue.- Returns:
- this/S.
-
inverse
SolvableLocalResidue inverse.- Specified by:
inversein interfaceMonoidElem<C extends GcdRingElem<C>>- Returns:
- S with S = 1/this.
- See Also:
-
remainder
SolvableLocalResidue remainder.- Specified by:
remainderin interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableLocalResidue.- Returns:
- this - (this/S)*S.
-
multiply
SolvableLocalResidue multiplication.- Specified by:
multiplyin interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableLocalResidue.- Returns:
- this*S.
-
multiply
SolvableLocalResidue multiplication by GenSolvablePolynomial.- Parameters:
b- GenSolvablePolynomial. - Returns:
- this*b.
-
multiply
SolvableLocalResidue multiplication by coefficient.- Parameters:
b- coefficient.- Returns:
- this*b.
-
multiply
SolvableLocalResidue multiplication by exponent.- Parameters:
e- exponent vector.- Returns:
- this*b.
-
monic
SolvableLocalResidue monic.- Returns:
- this with monic value part.
-
gcd
Greatest common divisor.- Specified by:
gcdin interfaceRingElem<C extends GcdRingElem<C>>- Parameters:
b- other element.- Returns:
- gcd(this,b).
-
egcd
Extended greatest common divisor.- Specified by:
egcdin interfaceRingElem<C extends GcdRingElem<C>>- Parameters:
b- other element.- Returns:
- [ gcd(this,b), c1, c2 ] with c1*this + c2*b = gcd(this,b).
-