Class SolvableQuotient<C extends GcdRingElem<C>>
java.lang.Object
edu.jas.fd.SolvableQuotient<C>
- All Implemented Interfaces:
AbelianGroupElem<SolvableQuotient<C>>, Element<SolvableQuotient<C>>, GcdRingElem<SolvableQuotient<C>>, MonoidElem<SolvableQuotient<C>>, QuotPair<GenPolynomial<C>>, RingElem<SolvableQuotient<C>>, Serializable, Comparable<SolvableQuotient<C>>
public class SolvableQuotient<C extends GcdRingElem<C>>
extends Object
implements GcdRingElem<SolvableQuotient<C>>, QuotPair<GenPolynomial<C>>
SolvableQuotient, that is a (left) rational function, based on
GenSolvablePolynomial with RingElem 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 SolvableQuotientRing<C> SolvableQuotient class factory data structure. -
Constructor Summary
ConstructorsModifierConstructorDescriptionThe constructor creates a SolvableQuotient object from a ring factory.The constructor creates a SolvableQuotient object from a ring factory and a numerator polynomial.The constructor creates a SolvableQuotient object from a ring factory and a numerator and denominator solvable polynomial.protectedSolvableQuotient(SolvableQuotientRing<C> r, GenSolvablePolynomial<C> n, GenSolvablePolynomial<C> d, boolean isred) The constructor creates a SolvableQuotient object from a ring factory and a numerator and denominator polynomial. -
Method Summary
Modifier and TypeMethodDescriptionabs()SolvableQuotient absolute value.intSolvableQuotient comparison.copy()Clone this.Denominator.divide(SolvableQuotient<C> S) SolvableQuotient division.egcd(SolvableQuotient<C> b) Extended greatest common divisor.booleanComparison with any other object.factory()Get the corresponding element factory.gcd(SolvableQuotient<C> b) Greatest common divisor.inthashCode()Hash code for this element.inverse()SolvableQuotient inverse.booleanIs Qoutient a constant.booleanisONE()Is SolvableQuotient one.booleanTest if SolvableQuotient right fraction.booleanisUnit()Is SolvableQuotient a unit.booleanisZERO()Is SolvableQuotient zero.monic()SolvableQuotient monic.SolvableQuotient multiplication by coefficient.SolvableQuotient multiplication.SolvableQuotient multiplication by exponent.SolvableQuotient multiplication by GenSolvablePolynomial.negate()SolvableQuotient negate.Numerator.Quotient and remainder by division of this by S.SolvableQuotient remainder.SolvableQuotient right fraction.intsignum()SolvableQuotient signum.SolvableQuotient subtraction.sum(SolvableQuotient<C> S) SolvableQuotient 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
SolvableQuotient class factory data structure. -
num
Numerator part of the element data structure. -
den
Denominator part of the element data structure.
-
-
Constructor Details
-
SolvableQuotient
The constructor creates a SolvableQuotient object from a ring factory.- Parameters:
r- ring factory.
-
SolvableQuotient
The constructor creates a SolvableQuotient object from a ring factory and a numerator polynomial. The denominator is assumed to be 1.- Parameters:
r- ring factory.n- numerator solvable polynomial.
-
SolvableQuotient
public SolvableQuotient(SolvableQuotientRing<C> r, GenSolvablePolynomial<C> n, GenSolvablePolynomial<C> d) The constructor creates a SolvableQuotient object from a ring factory and a numerator and denominator solvable polynomial.- Parameters:
r- ring factory.n- numerator polynomial.d- denominator polynomial.
-
SolvableQuotient
protected SolvableQuotient(SolvableQuotientRing<C> r, GenSolvablePolynomial<C> n, GenSolvablePolynomial<C> d, boolean isred) The constructor creates a SolvableQuotient 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 SolvableQuotient 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 SolvableQuotient 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 SolvableQuotient 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 Qoutient a constant.- Specified by:
isConstantin interfaceQuotPair<C extends GcdRingElem<C>>- Returns:
- true, if this has constant numerator and denominator, else false.
-
toString
-
toScript
-
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
SolvableQuotient comparison.- Specified by:
compareToin interfaceComparable<C extends GcdRingElem<C>>- Specified by:
compareToin interfaceElement<C extends GcdRingElem<C>>- Parameters:
b- SolvableQuotient.- Returns:
- sign(this-b).
-
equals
-
hashCode
-
rightFraction
SolvableQuotient right fraction. Note: It is not possible to distinguish right from left fractions in the current implementation. So it is not possible to compute with right fractions.- Returns:
- SolvableQuotient(a,b), where den-1 num = a b -1
-
isRightFraction
Test if SolvableQuotient right fraction. Note: It is not possible to distinguish right from left fractions in the current implementation. So it is not possible to compute with right fractions.- Parameters:
s- = SolvableQuotient(a,b)- Returns:
- true if s is a right fraction of this, i.e. den-1 num = a b-1
-
abs
SolvableQuotient absolute value.- Specified by:
absin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- the absolute value of this.
- See Also:
-
sum
SolvableQuotient summation.- Specified by:
sumin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableQuotient.- Returns:
- this+S.
-
negate
SolvableQuotient negate.- Specified by:
negatein interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- -this.
- See Also:
-
signum
public int signum()SolvableQuotient signum.- Specified by:
signumin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- signum(this).
- See Also:
-
subtract
SolvableQuotient subtraction.- Specified by:
subtractin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableQuotient.- Returns:
- this-S.
-
divide
SolvableQuotient division.- Specified by:
dividein interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableQuotient.- Returns:
- this/S.
-
inverse
SolvableQuotient inverse.- Specified by:
inversein interfaceMonoidElem<C extends GcdRingElem<C>>- Returns:
- S with S = 1/this.
- See Also:
-
remainder
SolvableQuotient remainder.- Specified by:
remainderin interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableQuotient.- Returns:
- this - (this/S)*S.
-
quotientRemainder
Quotient and remainder by division of this by S.- Specified by:
quotientRemainderin interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- a SolvableQuotient- Returns:
- [this/S, this - (this/S)*S].
-
multiply
SolvableQuotient multiplication.- Specified by:
multiplyin interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- SolvableQuotient.- Returns:
- this*S.
-
multiply
SolvableQuotient multiplication by GenSolvablePolynomial.- Parameters:
b- GenSolvablePolynomial. - Returns:
- this*b.
-
multiply
SolvableQuotient multiplication by coefficient.- Parameters:
b- coefficient.- Returns:
- this*b.
-
multiply
SolvableQuotient multiplication by exponent.- Parameters:
e- exponent vector.- Returns:
- this*b.
-
monic
-
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).
-