C
- coefficient typepublic class ExprPolynomial extends java.lang.Object implements java.lang.Iterable<ExprMonomial>
Modifier and Type | Field and Description |
---|---|
ExprPolynomialRing |
ring
The factory for the polynomial ring.
|
protected java.util.SortedMap<ExpVectorLong,IExpr> |
val
The data structure for polynomials.
|
Modifier | Constructor and Description |
---|---|
|
ExprPolynomial(ExprPolynomialRing r)
Constructor for zero GenPolynomial.
|
|
ExprPolynomial(ExprPolynomialRing r,
ExpVectorLong e)
Constructor for GenPolynomial xe.
|
|
ExprPolynomial(ExprPolynomialRing r,
IExpr c)
Constructor for GenPolynomial c * x0.
|
|
ExprPolynomial(ExprPolynomialRing r,
IExpr c,
ExpVectorLong e)
Constructor for GenPolynomial c * xe.
|
protected |
ExprPolynomial(ExprPolynomialRing r,
java.util.SortedMap<ExpVectorLong,IExpr> v)
Constructor for GenPolynomial.
|
Modifier and Type | Method and Description |
---|---|
ExprPolynomial |
abs()
GenPolynomial absolute value, i.e. leadingCoefficient > 0.
|
IExpr |
coefficient(ExpVectorLong e)
Coefficient.
|
java.util.Iterator |
coefficientIterator()
Iterator over coefficients.
|
IAST |
coefficientList()
Get the coefficients of a univariate polynomial up to n degree.
|
IAST |
coefficientRules()
Get the coefficient rules of a polynomial
List() form |
int |
compareTo(ExprPolynomial b)
GenPolynomial comparison.
|
java.util.Map<ExpVectorLong,ExprPolynomial> |
contract(ExprPolynomialRing pfac)
Contract variables.
|
ExprPolynomial |
contractCoeff(ExprPolynomialRing pfac)
Contract variables to coefficient polynomial.
|
ExprPolynomial |
copy()
Copy this GenPolynomial.
|
long |
degree()
Maximal degree.
|
long |
degree(int i)
Degree in variable i.
|
ExpVectorLong |
degreeVector()
Maximal degree vector.
|
ExprPolynomial |
deHomogenize(ExprPolynomialRing pfac)
Dehomogenize.
|
ExprPolynomial |
derivative()
Derivative of a polynomial.
|
ExprPolynomial |
divide(ExprPolynomial S)
GenPolynomial division.
|
ExprPolynomial |
divide(IExpr s)
GenPolynomial division.
|
ExprPolynomial[] |
divideAndRemainder(ExprPolynomial S)
Deprecated.
use quotientRemainder()
|
void |
doAddTo(ExprPolynomial S)
GenPolynomial destructive summation.
|
void |
doAddTo(IExpr a)
GenPolynomial destructive summation.
|
void |
doAddTo(IExpr a,
ExpVectorLong e)
GenPolynomial destructive summation.
|
void |
doPutToMap(ExpVectorLong e,
IExpr c)
Put an ExpVectorLong to coefficient entry into the internal map of this
GenPolynomial.
|
void |
doPutToMap(java.util.SortedMap<ExpVectorLong,IExpr> vals)
Put an a sorted map of exponents to coefficients into the internal map of
this GenPolynomial.
|
void |
doRemoveFromMap(ExpVectorLong e,
IExpr c)
Remove an ExpVectorLong to coefficient entry from the internal map of
this GenPolynomial.
|
ExprPolynomial[] |
egcd(ExprPolynomial S)
GenPolynomial extended greatest comon divisor.
|
boolean |
equals(java.lang.Object B)
Comparison with any other object.
|
java.util.Iterator<ExpVectorLong> |
exponentIterator()
Iterator over exponents.
|
ExprPolynomial |
extend(ExprPolynomialRing pfac,
int j,
long k)
Extend variables.
|
ExprPolynomial |
extendLower(ExprPolynomialRing pfac,
int j,
long k)
Extend lower variables.
|
ExprPolynomial |
extendUnivariate(ExprPolynomialRing pfac,
int i)
Extend univariate to multivariate polynomial.
|
ExprPolynomialRing |
factory()
Get the corresponding element factory.
|
ExprPolynomial |
gcd(ExprPolynomial S)
GenPolynomial greatest common divisor.
|
IExpr |
getExpr()
Converts a JAS
polynomial to a MathEclipse AST with head
Plus |
java.util.SortedMap<ExpVectorLong,IExpr> |
getMap()
ExpVectorLong to coefficient map of GenPolynomial.
|
int |
hashCode()
Hash code for this polynomial.
|
ExprPolynomial[] |
hegcd(ExprPolynomial S)
GenPolynomial half extended greatest comon divisor.
|
ExprPolynomial |
homogenize(ExprPolynomialRing pfac)
Make homogeneous.
|
ExprPolynomial |
inverse()
GenPolynomial inverse.
|
boolean |
isConstant()
Is GenPolynomial<C> a constant.
|
boolean |
isHomogeneous()
Is GenPolynomial<C> homogeneous.
|
boolean |
isOne()
Is GenPolynomial<C> one.
|
boolean |
isUnit()
Is GenPolynomial<C> a unit.
|
boolean |
isWeightHomogeneous()
Is GenPolynomial<C> homogeneous with respect to a weight.
|
boolean |
isZero()
Is GenPolynomial<C> zero.
|
java.util.Iterator<ExprMonomial> |
iterator()
Iterator over monomials.
|
IExpr |
leadingBaseCoefficient()
Leading base coefficient.
|
ExpVectorLong |
leadingExpVectorLong()
Leading exponent vector.
|
java.util.Map.Entry<ExpVectorLong,IExpr> |
leadingMonomial()
Leading monomial.
|
ExprPolynomial |
leadingWeightPolynomial()
Leading weight polynomial.
|
int |
length()
Length of GenPolynomial.
|
ExprPolynomial |
map(java.util.function.Function<IExpr,IExpr> f)
Map a unary function to the coefficients.
|
IExpr |
maxNorm()
GenPolynomial maximum norm.
|
ExprPolynomial |
modInverse(ExprPolynomial m)
GenPolynomial modular inverse.
|
ExprPolynomial |
monic()
GenPolynomial monic, i.e. leadingCoefficient == 1.
|
IAST |
monomialList()
Get the monomials of a polynomial in
List() form |
ExprPolynomial |
multiply(ExprPolynomial S)
GenPolynomial multiplication.
|
ExprPolynomial |
multiply(ExpVectorLong e)
GenPolynomial multiplication.
|
ExprPolynomial |
multiply(IExpr s)
GenPolynomial multiplication.
|
ExprPolynomial |
multiply(IExpr s,
ExpVectorLong e)
GenPolynomial multiplication.
|
ExprPolynomial |
multiply(java.util.Map.Entry<ExpVectorLong,IExpr> m)
GenPolynomial multiplication.
|
ExprPolynomial |
negate()
GenPolynomial negation.
|
int |
numberOfVariables()
Number of variables.
|
ExprPolynomial[] |
quotientRemainder(ExprPolynomial S)
GenPolynomial division with remainder.
|
ExprPolynomial |
reductum()
Reductum.
|
ExprPolynomial |
remainder(ExprPolynomial S)
GenPolynomial remainder.
|
ExprPolynomial |
reverse(ExprPolynomialRing oring)
Reverse variables.
|
ExprPolynomial |
scaleSubtractMultiple(IExpr b,
ExpVectorLong g,
IExpr a,
ExpVectorLong e,
ExprPolynomial S)
GenPolynomial scale and subtract a multiple.
|
ExprPolynomial |
scaleSubtractMultiple(IExpr b,
IExpr a,
ExprPolynomial S)
GenPolynomial scale and subtract a multiple.
|
ExprPolynomial |
scaleSubtractMultiple(IExpr b,
IExpr a,
ExpVectorLong e,
ExprPolynomial S)
GenPolynomial scale and subtract a multiple.
|
ExprPolynomial |
subtract(ExprPolynomial S)
GenPolynomial subtraction.
|
ExprPolynomial |
subtract(IExpr a)
GenPolynomial subtract.
|
ExprPolynomial |
subtract(IExpr a,
ExpVectorLong e)
GenPolynomial subtraction.
|
ExprPolynomial |
subtractMultiple(IExpr a,
ExprPolynomial S)
GenPolynomial subtract a multiple.
|
ExprPolynomial |
subtractMultiple(IExpr a,
ExpVectorLong e,
ExprPolynomial S)
GenPolynomial subtract a multiple.
|
ExprPolynomial |
sum(ExprPolynomial S)
GenPolynomial summation.
|
ExprPolynomial |
sum(IExpr a)
GenPolynomial addition.
|
ExprPolynomial |
sum(IExpr a,
ExpVectorLong e)
GenPolynomial addition.
|
IExpr |
sumNorm()
GenPolynomial sum norm.
|
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()
String representation of GenPolynomial.
|
java.lang.String |
toString(IAST v)
String representation of GenPolynomial.
|
long |
totalDegree()
Total degree.
|
ExpVectorLong |
trailingExpVectorLong()
Trailing exponent vector.
|
long |
weightDegree()
Weight degree.
|
public final ExprPolynomialRing ring
protected final java.util.SortedMap<ExpVectorLong,IExpr> val
public ExprPolynomial(ExprPolynomialRing r)
r
- polynomial ring factory.public ExprPolynomial(ExprPolynomialRing r, IExpr c, ExpVectorLong e)
r
- polynomial ring factory.c
- coefficient.e
- exponent.public ExprPolynomial(ExprPolynomialRing r, IExpr c)
r
- polynomial ring factory.c
- coefficient.public ExprPolynomial(ExprPolynomialRing r, ExpVectorLong e)
r
- polynomial ring factory.e
- exponent.protected ExprPolynomial(ExprPolynomialRing r, java.util.SortedMap<ExpVectorLong,IExpr> v)
r
- polynomial ring factory.v
- the SortedMap of some other polynomial.public ExprPolynomialRing factory()
Element.factory()
public ExprPolynomial copy()
public int length()
public java.util.SortedMap<ExpVectorLong,IExpr> getMap()
public void doPutToMap(ExpVectorLong e, IExpr c)
c
- coefficient.e
- exponent.public void doRemoveFromMap(ExpVectorLong e, IExpr c)
e
- exponent.c
- expected coefficient, null for ignore.public void doPutToMap(java.util.SortedMap<ExpVectorLong,IExpr> vals)
vals
- sorted map of exponents and coefficients.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toString(IAST v)
v
- names for variables.Object.toString()
public java.lang.String toScript()
Element.toScript()
public java.lang.String toScriptFactory()
Element.toScriptFactory()
public boolean isZero()
edu.jas.structure.RingElem#isZero()
public boolean isOne()
edu.jas.structure.RingElem#isOne()
public boolean isUnit()
MonoidElem.isUnit()
public boolean isConstant()
public boolean isHomogeneous()
public boolean equals(java.lang.Object B)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public int compareTo(ExprPolynomial b)
b
- GenPolynomial.public int numberOfVariables()
public java.util.Map.Entry<ExpVectorLong,IExpr> leadingMonomial()
public ExpVectorLong leadingExpVectorLong()
public ExpVectorLong trailingExpVectorLong()
public IExpr leadingBaseCoefficient()
public IExpr coefficient(ExpVectorLong e)
e
- exponent.public ExprPolynomial reductum()
public long degree(int i)
public long degree()
public long totalDegree()
public long weightDegree()
public ExprPolynomial leadingWeightPolynomial()
public boolean isWeightHomogeneous()
public ExpVectorLong degreeVector()
public IExpr maxNorm()
public IExpr sumNorm()
public ExprPolynomial sum(ExprPolynomial S)
S
- GenPolynomial.public ExprPolynomial sum(IExpr a, ExpVectorLong e)
a
- coefficient.e
- exponent.public ExprPolynomial sum(IExpr a)
a
- coefficient.public void doAddTo(ExprPolynomial S)
S
- GenPolynomial.public void doAddTo(IExpr a, ExpVectorLong e)
a
- coefficient.e
- exponent.public void doAddTo(IExpr a)
a
- coefficient.public ExprPolynomial subtract(ExprPolynomial S)
S
- GenPolynomial.public ExprPolynomial subtract(IExpr a, ExpVectorLong e)
a
- coefficient.e
- exponent.public ExprPolynomial subtract(IExpr a)
a
- coefficient.public ExprPolynomial subtractMultiple(IExpr a, ExprPolynomial S)
a
- coefficient.S
- GenPolynomial.public ExprPolynomial subtractMultiple(IExpr a, ExpVectorLong e, ExprPolynomial S)
a
- coefficient.e
- exponent.S
- GenPolynomial.public ExprPolynomial scaleSubtractMultiple(IExpr b, IExpr a, ExprPolynomial S)
b
- scale factor.a
- coefficient.S
- GenPolynomial.public ExprPolynomial scaleSubtractMultiple(IExpr b, IExpr a, ExpVectorLong e, ExprPolynomial S)
b
- scale factor.a
- coefficient.e
- exponent.S
- GenPolynomial.public ExprPolynomial scaleSubtractMultiple(IExpr b, ExpVectorLong g, IExpr a, ExpVectorLong e, ExprPolynomial S)
b
- scale factor.g
- scale exponent.a
- coefficient.e
- exponent.S
- GenPolynomial.public ExprPolynomial negate()
public ExprPolynomial abs()
public ExprPolynomial multiply(ExprPolynomial S)
S
- GenPolynomial.public ExprPolynomial multiply(IExpr s)
s
- coefficient.public ExprPolynomial monic()
public ExprPolynomial multiply(IExpr s, ExpVectorLong e)
s
- coefficient.e
- exponent.public ExprPolynomial multiply(ExpVectorLong e)
e
- exponent (!= null).public ExprPolynomial multiply(java.util.Map.Entry<ExpVectorLong,IExpr> m)
m
- 'monomial'.public ExprPolynomial divide(IExpr s)
s
- coefficient.public ExprPolynomial[] quotientRemainder(ExprPolynomial S)
S
- nonzero GenPolynomial with invertible leading coefficient.PolyUtil.baseSparsePseudoRemainder(edu.jas.poly.GenPolynomial,edu.jas.poly.GenPolynomial)
@Deprecated public ExprPolynomial[] divideAndRemainder(ExprPolynomial S)
S
- nonzero GenPolynomial with invertible leading coefficient.PolyUtil.baseSparsePseudoRemainder(edu.jas.poly.GenPolynomial,edu.jas.poly.GenPolynomial)
public ExprPolynomial divide(ExprPolynomial S)
S
- nonzero GenPolynomial with invertible leading coefficient.PolyUtil.baseSparsePseudoRemainder(edu.jas.poly.GenPolynomial,edu.jas.poly.GenPolynomial)
public ExprPolynomial remainder(ExprPolynomial S)
S
- nonzero GenPolynomial with invertible leading coefficient.PolyUtil.baseSparsePseudoRemainder(edu.jas.poly.GenPolynomial,edu.jas.poly.GenPolynomial)
public ExprPolynomial gcd(ExprPolynomial S)
S
- GenPolynomial.public ExprPolynomial[] egcd(ExprPolynomial S)
S
- GenPolynomial.public ExprPolynomial[] hegcd(ExprPolynomial S)
S
- GenPolynomial.public ExprPolynomial inverse()
public ExprPolynomial modInverse(ExprPolynomial m)
m
- GenPolynomial.public ExprPolynomial extend(ExprPolynomialRing pfac, int j, long k)
pfac
- extended polynomial ring factory (by i variables).j
- index of variable to be used for multiplication.k
- exponent for x_j.public ExprPolynomial extendLower(ExprPolynomialRing pfac, int j, long k)
pfac
- extended polynomial ring factory (by i variables).j
- index of variable to be used for multiplication.k
- exponent for x_j.public java.util.Map<ExpVectorLong,ExprPolynomial> contract(ExprPolynomialRing pfac)
pfac
- contracted polynomial ring factory (by i variables).public ExprPolynomial contractCoeff(ExprPolynomialRing pfac)
pfac
- contracted polynomial ring factory (by i variables).public ExprPolynomial extendUnivariate(ExprPolynomialRing pfac, int i)
pfac
- extended polynomial ring factory.i
- index of the variable of this polynomial in pfac.public ExprPolynomial homogenize(ExprPolynomialRing pfac)
pfac
- extended polynomial ring factory (by 1 variable).public ExprPolynomial deHomogenize(ExprPolynomialRing pfac)
pfac
- contracted polynomial ring factory (by 1 variable).public ExprPolynomial reverse(ExprPolynomialRing oring)
public java.util.Iterator coefficientIterator()
public java.util.Iterator<ExpVectorLong> exponentIterator()
public java.util.Iterator<ExprMonomial> iterator()
iterator
in interface java.lang.Iterable<ExprMonomial>
public ExprPolynomial map(java.util.function.Function<IExpr,IExpr> f)
f
- evaluation functor.public IAST coefficientRules()
List()
formpublic IAST monomialList()
List()
formpublic IAST coefficientList()
public ExprPolynomial derivative()