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>>
,java.io.Serializable
,java.lang.Comparable<SolvableLocalResidue<C>>
public class SolvableLocalResidue<C extends GcdRingElem<C>> extends java.lang.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.- Author:
- Heinz Kredel
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description GenSolvablePolynomial<C>
den
Denominator part of the element data structure.GenSolvablePolynomial<C>
num
Numerator part of the element data structure.SolvableLocalResidueRing<C>
ring
SolvableLocalResidue class factory data structure.
-
Constructor Summary
Constructors Modifier Constructor Description SolvableLocalResidue(SolvableLocalResidueRing<C> r)
The constructor creates a SolvableLocalResidue object from a ring factory.SolvableLocalResidue(SolvableLocalResidueRing<C> r, GenSolvablePolynomial<C> n)
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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SolvableLocalResidue<C>
abs()
SolvableLocalResidue absolute value.int
compareTo(SolvableLocalResidue<C> b)
SolvableLocalResidue comparison.SolvableLocalResidue<C>
copy()
Clone this.GenSolvablePolynomial<C>
denominator()
Denominator.SolvableLocalResidue<C>
divide(SolvableLocalResidue<C> S)
SolvableLocalResidue division.SolvableLocalResidue<C>[]
egcd(SolvableLocalResidue<C> b)
Extended greatest common divisor.boolean
equals(java.lang.Object b)
Comparison with any other object.SolvableLocalResidueRing<C>
factory()
Get the corresponding element factory.SolvableLocalResidue<C>
gcd(SolvableLocalResidue<C> b)
Greatest common divisor.int
hashCode()
Hash code for this element.SolvableLocalResidue<C>
inverse()
SolvableLocalResidue inverse.boolean
isConstant()
Is Quotient a constant.boolean
isONE()
Is SolvableLocalResidue one.boolean
isUnit()
Is SolvableLocalResidue a unit.boolean
isZERO()
Is SolvableLocalResidue zero.SolvableLocalResidue<C>
monic()
SolvableLocalResidue monic.SolvableLocalResidue<C>
multiply(C b)
SolvableLocalResidue multiplication by coefficient.SolvableLocalResidue<C>
multiply(SolvableLocalResidue<C> S)
SolvableLocalResidue multiplication.SolvableLocalResidue<C>
multiply(ExpVector e)
SolvableLocalResidue multiplication by exponent.SolvableLocalResidue<C>
multiply(GenSolvablePolynomial<C> b)
SolvableLocalResidue multiplication by GenSolvablePolynomial.SolvableLocalResidue<C>
negate()
SolvableLocalResidue negate.GenSolvablePolynomial<C>
numerator()
Numerator.SolvableLocalResidue<C>
remainder(SolvableLocalResidue<C> S)
SolvableLocalResidue remainder.int
signum()
SolvableLocalResidue signum.SolvableLocalResidue<C>
subtract(SolvableLocalResidue<C> S)
SolvableLocalResidue subtraction.SolvableLocalResidue<C>
sum(SolvableLocalResidue<C> S)
SolvableLocalResidue summation.java.lang.String
toScript()
Get a scripting compatible string representation.java.lang.String
toScriptFactory()
Get a scripting compatible string representation of the factory.java.lang.String
toString()
Get the String representation as RingElem.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface edu.jas.structure.MonoidElem
leftDivide, leftRemainder, power, quotientRemainder, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
-
-
-
-
Field Detail
-
ring
public final SolvableLocalResidueRing<C extends GcdRingElem<C>> ring
SolvableLocalResidue class factory data structure.
-
num
public final GenSolvablePolynomial<C extends GcdRingElem<C>> num
Numerator part of the element data structure.
-
den
public final GenSolvablePolynomial<C extends GcdRingElem<C>> den
Denominator part of the element data structure.
-
-
Constructor Detail
-
SolvableLocalResidue
public SolvableLocalResidue(SolvableLocalResidueRing<C> r)
The constructor creates a SolvableLocalResidue object from a ring factory.- Parameters:
r
- ring factory.
-
SolvableLocalResidue
public SolvableLocalResidue(SolvableLocalResidueRing<C> r, GenSolvablePolynomial<C> n)
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 Detail
-
factory
public SolvableLocalResidueRing<C> factory()
Get the corresponding element factory.- Specified by:
factory
in interfaceElement<C extends GcdRingElem<C>>
- Returns:
- factory for this Element.
- See Also:
Element.factory()
-
numerator
public GenSolvablePolynomial<C> numerator()
Numerator.- Specified by:
numerator
in interfaceQuotPair<C extends GcdRingElem<C>>
- See Also:
QuotPair.numerator()
-
denominator
public GenSolvablePolynomial<C> denominator()
Denominator.- Specified by:
denominator
in interfaceQuotPair<C extends GcdRingElem<C>>
- See Also:
QuotPair.denominator()
-
copy
public SolvableLocalResidue<C> copy()
Clone this.- Specified by:
copy
in interfaceElement<C extends GcdRingElem<C>>
- Returns:
- Creates and returns a copy of this Element.
- See Also:
Object.clone()
-
isZERO
public boolean isZERO()
Is SolvableLocalResidue zero.- Specified by:
isZERO
in interfaceAbelianGroupElem<C extends GcdRingElem<C>>
- Returns:
- If this is 0 then true is returned, else false.
- See Also:
AbelianGroupElem.isZERO()
-
isONE
public boolean isONE()
Is SolvableLocalResidue one.- Specified by:
isONE
in interfaceMonoidElem<C extends GcdRingElem<C>>
- Returns:
- If this is 1 then true is returned, else false.
- See Also:
MonoidElem.isONE()
-
isUnit
public boolean isUnit()
Is SolvableLocalResidue a unit.- Specified by:
isUnit
in interfaceMonoidElem<C extends GcdRingElem<C>>
- Returns:
- If this is a unit then true is returned, else false.
- See Also:
MonoidElem.isUnit()
-
isConstant
public boolean isConstant()
Is Quotient a constant.- Specified by:
isConstant
in interfaceQuotPair<C extends GcdRingElem<C>>
- Returns:
- true, if this has constant numerator and denominator, else false.
-
toString
public java.lang.String toString()
Get the String representation as RingElem.- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
toScript
public java.lang.String toScript()
Get a scripting compatible string representation.- Specified by:
toScript
in interfaceElement<C extends GcdRingElem<C>>
- Returns:
- script compatible representation for this Element.
- See Also:
Element.toScript()
-
toScriptFactory
public java.lang.String toScriptFactory()
Get a scripting compatible string representation of the factory.- Specified by:
toScriptFactory
in interfaceElement<C extends GcdRingElem<C>>
- Returns:
- script compatible representation for this ElemFactory.
- See Also:
Element.toScriptFactory()
-
compareTo
public int compareTo(SolvableLocalResidue<C> b)
SolvableLocalResidue comparison.- Specified by:
compareTo
in interfacejava.lang.Comparable<C extends GcdRingElem<C>>
- Specified by:
compareTo
in interfaceElement<C extends GcdRingElem<C>>
- Parameters:
b
- SolvableLocalResidue.- Returns:
- sign(this-b).
-
equals
public boolean equals(java.lang.Object b)
Comparison with any other object.- Specified by:
equals
in interfaceElement<C extends GcdRingElem<C>>
- Overrides:
equals
in classjava.lang.Object
- Returns:
- true if this is equal to b, else false.
- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Hash code for this element.- Specified by:
hashCode
in interfaceElement<C extends GcdRingElem<C>>
- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- the hashCode.
- See Also:
Object.hashCode()
-
abs
public SolvableLocalResidue<C> abs()
SolvableLocalResidue absolute value.- Specified by:
abs
in interfaceAbelianGroupElem<C extends GcdRingElem<C>>
- Returns:
- the absolute value of this.
- See Also:
AbelianGroupElem.abs()
-
sum
public SolvableLocalResidue<C> sum(SolvableLocalResidue<C> S)
SolvableLocalResidue summation.- Specified by:
sum
in interfaceAbelianGroupElem<C extends GcdRingElem<C>>
- Parameters:
S
- SolvableLocalResidue.- Returns:
- this+S.
-
negate
public SolvableLocalResidue<C> negate()
SolvableLocalResidue negate.- Specified by:
negate
in interfaceAbelianGroupElem<C extends GcdRingElem<C>>
- Returns:
- -this.
- See Also:
AbelianGroupElem.negate()
-
signum
public int signum()
SolvableLocalResidue signum.- Specified by:
signum
in interfaceAbelianGroupElem<C extends GcdRingElem<C>>
- Returns:
- signum(this).
- See Also:
AbelianGroupElem.signum()
-
subtract
public SolvableLocalResidue<C> subtract(SolvableLocalResidue<C> S)
SolvableLocalResidue subtraction.- Specified by:
subtract
in interfaceAbelianGroupElem<C extends GcdRingElem<C>>
- Parameters:
S
- SolvableLocalResidue.- Returns:
- this-S.
-
divide
public SolvableLocalResidue<C> divide(SolvableLocalResidue<C> S)
SolvableLocalResidue division.- Specified by:
divide
in interfaceMonoidElem<C extends GcdRingElem<C>>
- Parameters:
S
- SolvableLocalResidue.- Returns:
- this/S.
-
inverse
public SolvableLocalResidue<C> inverse()
SolvableLocalResidue inverse.- Specified by:
inverse
in interfaceMonoidElem<C extends GcdRingElem<C>>
- Returns:
- S with S = 1/this.
- See Also:
MonoidElem.inverse()
-
remainder
public SolvableLocalResidue<C> remainder(SolvableLocalResidue<C> S)
SolvableLocalResidue remainder.- Specified by:
remainder
in interfaceMonoidElem<C extends GcdRingElem<C>>
- Parameters:
S
- SolvableLocalResidue.- Returns:
- this - (this/S)*S.
-
multiply
public SolvableLocalResidue<C> multiply(SolvableLocalResidue<C> S)
SolvableLocalResidue multiplication.- Specified by:
multiply
in interfaceMonoidElem<C extends GcdRingElem<C>>
- Parameters:
S
- SolvableLocalResidue.- Returns:
- this*S.
-
multiply
public SolvableLocalResidue<C> multiply(GenSolvablePolynomial<C> b)
SolvableLocalResidue multiplication by GenSolvablePolynomial.- Parameters:
b
- GenSolvablePolynomial. - Returns:
- this*b.
-
multiply
public SolvableLocalResidue<C> multiply(C b)
SolvableLocalResidue multiplication by coefficient.- Parameters:
b
- coefficient.- Returns:
- this*b.
-
multiply
public SolvableLocalResidue<C> multiply(ExpVector e)
SolvableLocalResidue multiplication by exponent.- Parameters:
e
- exponent vector.- Returns:
- this*b.
-
monic
public SolvableLocalResidue<C> monic()
SolvableLocalResidue monic.- Returns:
- this with monic value part.
-
gcd
public SolvableLocalResidue<C> gcd(SolvableLocalResidue<C> b)
Greatest common divisor.- Specified by:
gcd
in interfaceRingElem<C extends GcdRingElem<C>>
- Parameters:
b
- other element.- Returns:
- gcd(this,b).
-
egcd
public SolvableLocalResidue<C>[] egcd(SolvableLocalResidue<C> b)
Extended greatest common divisor.- Specified by:
egcd
in interfaceRingElem<C extends GcdRingElem<C>>
- Parameters:
b
- other element.- Returns:
- [ gcd(this,b), c1, c2 ] with c1*this + c2*b = gcd(this,b).
-
-