Package edu.jas.poly
Class GenSolvablePolynomial<C extends RingElem<C>>
java.lang.Object
edu.jas.poly.GenPolynomial<C>
edu.jas.poly.GenSolvablePolynomial<C>
- Type Parameters:
C
- coefficient type
- All Implemented Interfaces:
AbelianGroupElem<GenPolynomial<C>>
,Element<GenPolynomial<C>>
,MonoidElem<GenPolynomial<C>>
,RingElem<GenPolynomial<C>>
,Serializable
,Comparable<GenPolynomial<C>>
,Iterable<Monomial<C>>
- Direct Known Subclasses:
LocalSolvablePolynomial
,QLRSolvablePolynomial
,QuotSolvablePolynomial
,RecSolvablePolynomial
,RecSolvableWordPolynomial
,ResidueSolvablePolynomial
,ResidueSolvableWordPolynomial
GenSolvablePolynomial generic solvable polynomials implementing RingElem.
n-variate ordered solvable polynomials over C. Objects of this class are
intended to be immutable. The implementation is based on TreeMap respectively
SortedMap from exponents to coefficients by extension of GenPolybomial. Only
the coefficients are modeled with generic types, the exponents are fixed to
ExpVector with long, int, short entries (@see edu.jas.poly.ExpVector
StorUnit).
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Logger
final GenSolvablePolynomialRing
<C> The factory for the solvable polynomial ring.Fields inherited from class edu.jas.poly.GenPolynomial
blen, hash, val
-
Constructor Summary
ConstructorsModifierConstructorDescriptionConstructor for zero GenSolvablePolynomial.Constructor for GenSolvablePolynomial.Constructor for GenSolvablePolynomial.protected
Constructor for GenSolvablePolynomial. -
Method Summary
Modifier and TypeMethodDescriptioncopy()
Clone this GenSolvablePolynomial.GenSolvablePolynomial left division.boolean
Comparison with any other object.Evaluate RecSolvablePolynomial as right coefficients polynomial.factory()
Get the corresponding element factory.int
hashCode()
Hash code for this polynomial.boolean
Test RecSolvablePolynomial right coefficients polynomial.GenSolvablePolynomial left monic, i.e.monic()
GenSolvablePolynomial left monic, i.e.GenSolvablePolynomial multiplication.GenSolvablePolynomial left and right multiplication.GenSolvablePolynomial multiplication.GenSolvablePolynomial left and right multiplication.GenSolvablePolynomial multiplication.GenSolvablePolynomial left and right multiplication.GenSolvablePolynomial multiplication.GenSolvablePolynomial left and right multiplication.GenSolvablePolynomial multiplication.multiplyLeft
(C b) GenSolvablePolynomial multiplication.multiplyLeft
(C b, ExpVector e) GenSolvablePolynomial multiplication.GenSolvablePolynomial multiplication.GenSolvablePolynomial multiplication.GenSolvablePolynomial left division with remainder.GenSolvablePolynomial remainder by left division.GenSolvablePolynomial right division.GenSolvablePolynomial right monic, i.e.GenSolvablePolynomial right division with remainder.RecSolvablePolynomial right coefficients from left coefficients.GenSolvablePolynomial remainder by right division.scaleSubtractMultiple
(C b, C a, ExpVector e, GenSolvablePolynomial<C> S) GenSolvablePolynomial scale and subtract a multiple.scaleSubtractMultiple
(C b, C a, GenSolvablePolynomial<C> S) GenSolvablePolynomial scale and subtract a multiple.scaleSubtractMultiple
(C b, ExpVector g, C a, ExpVector e, GenSolvablePolynomial<C> S) GenSolvablePolynomial scale and subtract a multiple.subtractMultiple
(C a, ExpVector e, GenSolvablePolynomial<C> S) GenSolvablePolynomial subtract a multiple.subtractMultiple
(C a, GenSolvablePolynomial<C> S) GenSolvablePolynomial subtract a multiple.Methods inherited from class edu.jas.poly.GenPolynomial
abs, bitLength, coefficient, coefficientIterator, coeffPrimitivePart, compareTo, contract, contractCoeff, degree, degree, degreeMin, degreeVector, deHomogenize, deltaExpVectors, deltaExpVectors, divide, divide, doAddTo, doAddTo, doAddTo, doPutToMap, doPutToMap, doRemoveFromMap, egcd, exponentIterator, extend, extendLower, extendUnivariate, gcd, getMap, hegcd, homogenize, inflate, inverse, isConstant, isHomogeneous, isONE, isUnit, isWeightHomogeneous, isZERO, iterator, leadingBaseCoefficient, leadingExpVector, leadingFacetPolynomial, leadingMonomial, leadingWeightPolynomial, leftDivideCoeff, length, map, mapOnStream, mapOnStream, mapWrong, maxNorm, modInverse, monicRight, multiply, negate, negateAlt, numberOfVariables, quotientRemainder, reductum, remainder, reverse, rightDivideCoeff, rightGcd, scaleSubtractMultiple, scaleSubtractMultiple, scaleSubtractMultiple, signum, spliterator, squareNorm, subtract, subtract, subtract, subtract, subtractMultiple, subtractMultiple, sum, sum, sum, sum, sumNorm, toScript, toScriptFactory, toString, toString, totalDegree, trailingBaseCoefficient, trailingExpVector, weightDegree
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, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
ring
The factory for the solvable polynomial ring. Hides super.ring.
-
-
Constructor Details
-
GenSolvablePolynomial
Constructor for zero GenSolvablePolynomial.- Parameters:
r
- solvable polynomial ring factory.
-
GenSolvablePolynomial
Constructor for GenSolvablePolynomial.- Parameters:
r
- solvable polynomial ring factory.c
- coefficient.e
- exponent.
-
GenSolvablePolynomial
Constructor for GenSolvablePolynomial.- Parameters:
r
- solvable polynomial ring factory.c
- coefficient.
-
GenSolvablePolynomial
Constructor for GenSolvablePolynomial.- Parameters:
r
- solvable polynomial ring factory.v
- the SortedMap of some other (solvable) polynomial.
-
-
Method Details
-
factory
Get the corresponding element factory. -
copy
Clone this GenSolvablePolynomial. -
equals
Comparison with any other object. -
hashCode
public int hashCode()Hash code for this polynomial. -
multiply
GenSolvablePolynomial multiplication.- Parameters:
Bp
- GenSolvablePolynomial.- Returns:
- this*Bp, where * denotes solvable multiplication.
-
multiply
GenSolvablePolynomial left and right multiplication. Product with two polynomials.- Parameters:
S
- GenSolvablePolynomial.T
- GenSolvablePolynomial.- Returns:
- S*this*T.
-
multiply
GenSolvablePolynomial multiplication. Product with coefficient ring element.- Overrides:
multiply
in classGenPolynomial<C extends RingElem<C>>
- Parameters:
b
- coefficient.- Returns:
- this*b, where * is coefficient multiplication.
-
multiply
GenSolvablePolynomial left and right multiplication. Product with coefficient ring element.- Parameters:
b
- coefficient.c
- coefficient.- Returns:
- b*this*c, where * is coefficient multiplication.
-
multiply
GenSolvablePolynomial multiplication. Product with exponent vector.- Overrides:
multiply
in classGenPolynomial<C extends RingElem<C>>
- Parameters:
e
- exponent.- Returns:
- this * xe, where * denotes solvable multiplication.
-
multiply
GenSolvablePolynomial left and right multiplication. Product with exponent vector.- Parameters:
e
- exponent.f
- exponent.- Returns:
- xe * this * xf, where * denotes solvable multiplication.
-
multiply
GenSolvablePolynomial multiplication. Product with ring element and exponent vector.- Overrides:
multiply
in classGenPolynomial<C extends RingElem<C>>
- Parameters:
b
- coefficient.e
- exponent.- Returns:
- this * b xe, where * denotes solvable multiplication.
-
multiply
GenSolvablePolynomial left and right multiplication. Product with ring element and exponent vector.- Parameters:
b
- coefficient.e
- exponent.c
- coefficient.f
- exponent.- Returns:
- b xe * this * c xf, where * denotes solvable multiplication.
-
multiplyLeft
GenSolvablePolynomial multiplication. Left product with ring element and exponent vector.- Parameters:
b
- coefficient.e
- exponent.- Returns:
- b xe * this, where * denotes solvable multiplication.
-
multiplyLeft
GenSolvablePolynomial multiplication. Left product with exponent vector.- Parameters:
e
- exponent.- Returns:
- xe * this, where * denotes solvable multiplication.
-
multiplyLeft
GenSolvablePolynomial multiplication. Left product with coefficient ring element.- Overrides:
multiplyLeft
in classGenPolynomial<C extends RingElem<C>>
- Parameters:
b
- coefficient.- Returns:
- b*this, where * is coefficient multiplication.
-
multiplyLeft
GenSolvablePolynomial multiplication. Left product with 'monomial'.- Parameters:
m
- 'monomial'.- Returns:
- m * this, where * denotes solvable multiplication.
-
multiply
GenSolvablePolynomial multiplication. Product with 'monomial'.- Overrides:
multiply
in classGenPolynomial<C extends RingElem<C>>
- Parameters:
m
- 'monomial'.- Returns:
- this * m, where * denotes solvable multiplication.
-
subtractMultiple
GenSolvablePolynomial subtract a multiple.- Parameters:
a
- coefficient.S
- GenSolvablePolynomial.- Returns:
- this - a * S.
-
subtractMultiple
GenSolvablePolynomial subtract a multiple.- Parameters:
a
- coefficient.e
- exponent.S
- GenSolvablePolynomial.- Returns:
- this - a * xe * S.
-
scaleSubtractMultiple
GenSolvablePolynomial scale and subtract a multiple.- Parameters:
b
- scale factor.a
- coefficient.S
- GenSolvablePolynomial.- Returns:
- b * this - a * S.
-
scaleSubtractMultiple
public GenSolvablePolynomial<C> scaleSubtractMultiple(C b, C a, ExpVector e, GenSolvablePolynomial<C> S) GenSolvablePolynomial scale and subtract a multiple.- Parameters:
b
- scale factor.a
- coefficient.e
- exponent.S
- GenSolvablePolynomial.- Returns:
- b * this - a * xe * S.
-
scaleSubtractMultiple
public GenSolvablePolynomial<C> scaleSubtractMultiple(C b, ExpVector g, C a, ExpVector e, GenSolvablePolynomial<C> S) GenSolvablePolynomial scale and subtract a multiple.- Parameters:
b
- scale factor.g
- scale exponent.a
- coefficient.e
- exponent.S
- GenSolvablePolynomial.- Returns:
- a * xg * this - a * xe * S.
-
monic
GenSolvablePolynomial left monic, i.e. leadingCoefficient == 1. If leadingCoefficient is not invertible returns this abs value.- Overrides:
monic
in classGenPolynomial<C extends RingElem<C>>
- Returns:
- ldcf(this)**(-1) * this.
-
leftMonic
GenSolvablePolynomial left monic, i.e. leadingCoefficient == 1. If leadingCoefficient is not invertible returns this abs value.- Returns:
- ldcf(this)**(-1) * this.
-
rightMonic
GenSolvablePolynomial right monic, i.e. leadingCoefficient == 1. If leadingCoefficient is not invertible returns this abs value.- Returns:
- this * ldcf(this)**(-1).
-
divide
GenSolvablePolynomial left division. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Parameters:
S
- nonzero GenSolvablePolynomial with invertible leading coefficient.- Returns:
- quotient with this = quotient * S + remainder and deg(remainder) < deg(S) or remainder = 0.
- See Also:
-
remainder
GenSolvablePolynomial remainder by left division. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Parameters:
S
- nonzero GenSolvablePolynomial with invertible leading coefficient.- Returns:
- remainder with this = quotient * S + remainder and deg(remainder) < deg(S) or remainder = 0.
- See Also:
-
quotientRemainder
GenSolvablePolynomial left division with remainder. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Parameters:
S
- nonzero GenSolvablePolynomial with invertible leading coefficient.- Returns:
- [ quotient , remainder ] with this = quotient * S + remainder and deg(remainder) < deg(S) or remainder = 0.
- See Also:
-
rightDivide
GenSolvablePolynomial right division. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Parameters:
S
- nonzero GenSolvablePolynomial with invertible leading coefficient.- Returns:
- quotient with this = S * quotient + remainder and deg(remainder) < deg(S) or remainder = 0.
- See Also:
-
rightRemainder
GenSolvablePolynomial remainder by right division. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Parameters:
S
- nonzero GenSolvablePolynomial with invertible leading coefficient.- Returns:
- remainder with this = S * quotient + remainder and deg(remainder) < deg(S) or remainder = 0.
- See Also:
-
rightQuotientRemainder
GenSolvablePolynomial right division with remainder. Fails, if exact division by leading base coefficient is not possible. Meaningful only for univariate polynomials over fields, but works in any case.- Parameters:
S
- nonzero GenSolvablePolynomial with invertible leading coefficient.- Returns:
- [ quotient , remainder ] with this = S * quotient + remainder and deg(remainder) < deg(S) or remainder = 0.
- See Also:
-
rightRecursivePolynomial
RecSolvablePolynomial right coefficients from left coefficients. Note: R is represented as a polynomial with left coefficients, the implementation can at the moment not distinguish between left and right coefficients.- Returns:
- R = sum( Xi bi ), with P = sum(ai Xi ) and eval(sum(Xi bi)) == sum(ai Xi)
-
evalAsRightRecursivePolynomial
Evaluate RecSolvablePolynomial as right coefficients polynomial. Note: R is represented as a polynomial with left coefficients, the implementation can at the moment not distinguish between left and right coefficients.- Returns:
- this as evaluated polynomial R. R = sum( Xi bi ), this = sum(ai Xi ) = eval(sum(Xi bi))
-
isRightRecursivePolynomial
Test RecSolvablePolynomial right coefficients polynomial. Note: R is represented as a polynomial with left coefficients, the implementation can at the moment not distinguish between left and right coefficients.- Parameters:
R
- GenSolvablePolynomial with right coefficients.- Returns:
- true, if R is polynomial with right coefficients of this. R = sum( Xi bi ), with this = sum(ai Xi ) and eval(sum(Xi bi)) == sum(ai Xi)
-