C
- coefficient typepublic class ExprPolynomialRing
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
ExprRingFactory |
coFac
The factory for the coefficients.
|
static int |
creations
Count for number of polynomial creations.
|
ExpVectorLong |
evzero
The constant exponent vector 0 for this ring.
|
protected int |
isField
Indicator if this ring is a field.
|
int |
nvar
The number of variables.
|
ExprPolynomial |
ONE
The constant polynomial 1 for this ring.
|
protected boolean |
partial
True for partially reversed variables.
|
protected static java.util.Random |
random
A default random sequence generator.
|
ExprTermOrder |
tord
The term order.
|
protected IAST |
vars
The names of the variables.
|
ExprPolynomial |
ZERO
The constant polynomial 0 for this ring.
|
Constructor and Description |
---|
ExprPolynomialRing(ExprPolynomialRing o,
ExprTermOrder to)
The constructor creates a polynomial factory object with the the same coefficient factory, number of variables and variable
names as the given polynomial factory, only the term order differs.
|
ExprPolynomialRing(ExprRingFactory cf,
ExprPolynomialRing o)
The constructor creates a polynomial factory object with the the same term order, number of variables and variable names as
the given polynomial factory, only the coefficient factories differ.
|
ExprPolynomialRing(ExprRingFactory cf,
IAST v)
The constructor creates a polynomial factory object.
|
ExprPolynomialRing(ExprRingFactory cf,
IAST listOfVariables,
ExprTermOrder t)
The constructor creates a polynomial factory object.
|
ExprPolynomialRing(ExprRingFactory cf,
IAST listOfVariables,
int n)
The constructor creates a polynomial factory object.
|
ExprPolynomialRing(ExprRingFactory cf,
IAST listOfVariables,
int n,
ExprTermOrder t)
The constructor creates a polynomial factory object.
|
ExprPolynomialRing(ExprRingFactory cf,
IAST listOfVariables,
int n,
ExprTermOrder t,
boolean numericFunction)
The constructor creates a polynomial factory object.
|
ExprPolynomialRing(IAST listOfVariables)
The constructor creates a polynomial factory object.
|
ExprPolynomialRing(IAST listOfVariables,
ExprTermOrder t)
The constructor creates a polynomial factory object.
|
Modifier and Type | Method and Description |
---|---|
static void |
addVars(IAST vars)
Add variable names.
|
java.math.BigInteger |
characteristic()
Characteristic of this ring.
|
ExprPolynomialRing |
copy()
Copy this factory.
|
ExprPolynomial |
copy(ExprPolynomial c)
Copy polynomial c.
|
ExprPolynomial |
create(IExpr exprPoly)
Create a
Polynomial from the given exprPoly . |
ExprPolynomial |
create(IExpr exprPoly,
boolean coefficient)
Create a
Polynomial from the given exprPoly . |
ExprPolynomialRing |
distribute()
Distributive representation as polynomial with all main variables.
|
boolean |
equals(java.lang.Object other)
Comparison with any other object.
|
ExprPolynomialRing |
extend(IAST vn)
Extend variables.
|
ExprPolynomialRing |
extendLower(IAST vn)
Extend lower variables.
|
ExprPolynomial |
fromInteger(java.math.BigInteger a)
Get a (constant) GenPolynomial<C> element from a BigInteger value.
|
ExprPolynomial |
fromInteger(long a)
Get a (constant) GenPolynomial<C> element from a long value.
|
java.util.List<ExprPolynomial> |
generators()
Get a list of the generating elements.
|
java.util.List<ExprPolynomial> |
generators(int modv)
Get a list of the generating elements excluding the module variables.
|
ExprPolynomialComparator |
getComparator()
Get PolynomialComparator.
|
ExprPolynomialComparator |
getComparator(boolean rev)
Get PolynomialComparator.
|
int |
getCreations()
Get the number of polynomial creations.
|
java.util.List<ExprPolynomial> |
getGenerators()
Get the generating elements excluding the generators for the coefficient ring.
|
ExprPolynomial |
getOne()
Get the one element.
|
IExpr |
getONECoefficient()
Get the one element from the coefficients.
|
IAST |
getVars()
Get the variable names.
|
ExprPolynomial |
getZero()
Get the zero element.
|
IExpr |
getZEROCoefficient()
Get the zero element from the coefficients.
|
int |
hashCode()
Hash code for this polynomial ring.
|
boolean |
isAssociative()
Query if this ring is associative.
|
boolean |
isCommutative()
Query if this ring is commutative.
|
boolean |
isField()
Query if this ring is a field.
|
boolean |
isFinite()
Is this structure finite or infinite.
|
boolean |
isPolynomial(IExpr expression)
Create a
Polynomial from the given exprPoly . |
boolean |
isPolynomial(IExpr expression,
boolean coefficient)
Create a
Polynomial from the given exprPoly . |
java.util.Iterator<ExprPolynomial> |
iterator()
Get a GenPolynomial iterator.
|
static java.lang.String[] |
permuteVars(java.util.List<java.lang.Integer> P,
java.lang.String[] vars)
Permute variable names.
|
IAST |
setVars(IAST v)
Set the variable names.
|
java.lang.String |
toScript()
Get a scripting compatible string representation.
|
java.lang.String |
toScript(ExpVectorLong e)
Get a scripting compatible string representation of an ExpVectorLong of this ring.
|
java.lang.String |
toString()
Get the String representation.
|
ExprPolynomial |
univariate(int i)
Generate univariate polynomial in a given variable.
|
ExprPolynomial |
univariate(int modv,
int i,
long e)
Generate univariate polynomial in a given variable with given exponent.
|
ExprPolynomial |
univariate(int i,
long e)
Generate univariate polynomial in a given variable with given exponent.
|
java.util.List<? extends ExprPolynomial> |
univariateList()
Generate list of univariate polynomials in all variables.
|
java.util.List<? extends ExprPolynomial> |
univariateList(int modv)
Generate list of univariate polynomials in all variables.
|
java.util.List<? extends ExprPolynomial> |
univariateList(int modv,
long e)
Generate list of univariate polynomials in all variables with given exponent.
|
ExprPolynomial |
valueOf(ExpVectorLong e)
Get a GenPolynomial<C> element from an exponent vector.
|
ExprPolynomial |
valueOf(IExpr a)
Get a (constant) GenPolynomial<C> element from a coefficient value.
|
ExprPolynomial |
valueOf(IExpr a,
ExpVectorLong e)
Get a GenPolynomial<C> element from a coeffcient and an exponent vector.
|
java.lang.String |
varsToString()
Get a String representation of the variable names.
|
public final ExprRingFactory coFac
public final int nvar
public final ExprTermOrder tord
protected boolean partial
protected IAST vars
public final ExprPolynomial ZERO
public final ExprPolynomial ONE
public final ExpVectorLong evzero
protected static final java.util.Random random
protected int isField
public static int creations
public ExprPolynomialRing(ExprRingFactory cf, IAST v)
cf
- factory for coefficients of type C.v
- names for the variables.public ExprPolynomialRing(IAST listOfVariables)
listOfVariables
- names for the variables.public ExprPolynomialRing(IAST listOfVariables, ExprTermOrder t)
listOfVariables
- names for the variables.t
- a term order.public ExprPolynomialRing(ExprRingFactory cf, IAST listOfVariables, int n)
cf
- factory for coefficients of type C.listOfVariables
- names for the variables.n
- number of variables.public ExprPolynomialRing(ExprRingFactory cf, IAST listOfVariables, ExprTermOrder t)
cf
- factory for coefficients of type C.listOfVariables
- names for the variables.t
- a term order.public ExprPolynomialRing(ExprRingFactory cf, IAST listOfVariables, int n, ExprTermOrder t)
cf
- factory for coefficients of type C.listOfVariables
- names for the variables.n
- number of variables.t
- a term order.public ExprPolynomialRing(ExprRingFactory cf, IAST listOfVariables, int n, ExprTermOrder t, boolean numericFunction)
cf
- factory for coefficients of type C.v
- names for the variables.n
- number of variables.t
- a term order.public ExprPolynomialRing(ExprRingFactory cf, ExprPolynomialRing o)
cf
- factory for coefficients of type C.o
- other polynomial ring.public ExprPolynomialRing(ExprPolynomialRing o, ExprTermOrder to)
to
- term order.o
- other polynomial ring.public ExprPolynomialRing copy()
public ExprPolynomial create(IExpr exprPoly) throws java.lang.ArithmeticException, java.lang.ClassCastException
Polynomial
from the given exprPoly
.exprPoly
- the polynomial expressionjava.lang.ArithmeticException
java.lang.ClassCastException
public ExprPolynomial create(IExpr exprPoly, boolean coefficient) throws java.lang.ArithmeticException, java.lang.ClassCastException
Polynomial
from the given exprPoly
.exprPoly
- the polynomial expressioncoefficient
- set to true
if called by the Coefficient()
functionjava.lang.ArithmeticException
java.lang.ClassCastException
public boolean isPolynomial(IExpr expression) throws java.lang.ArithmeticException, java.lang.ClassCastException
Polynomial
from the given exprPoly
.expression
- the expression which should be checked if it's a polynomialcoefficient
- set to true
if called by the Coefficient()
functiontrue
if the given expression is a polynomialjava.lang.ArithmeticException
java.lang.ClassCastException
public boolean isPolynomial(IExpr expression, boolean coefficient) throws java.lang.ArithmeticException, java.lang.ClassCastException
Polynomial
from the given exprPoly
.expression
- the expression which should be checked if it's a polynomialcoefficient
- set to true
if called by the Coefficient()
functiontrue
if the given expression is a polynomialjava.lang.ArithmeticException
java.lang.ClassCastException
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toScript()
Element.toScript()
public java.lang.String toScript(ExpVectorLong e)
e
- exponent vectorpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public int getCreations()
public IAST getVars()
public java.lang.String varsToString()
public IExpr getZEROCoefficient()
public IExpr getONECoefficient()
public ExprPolynomial getZero()
public ExprPolynomial getOne()
public boolean isCommutative()
public boolean isAssociative()
public boolean isField()
public java.math.BigInteger characteristic()
public ExprPolynomial valueOf(IExpr a)
a
- coefficient.public ExprPolynomial valueOf(ExpVectorLong e)
e
- exponent vector.public ExprPolynomial valueOf(IExpr a, ExpVectorLong e)
a
- coefficient.e
- exponent vector.public ExprPolynomial fromInteger(long a)
a
- long.public ExprPolynomial fromInteger(java.math.BigInteger a)
a
- BigInteger.public ExprPolynomial copy(ExprPolynomial c)
c
- public ExprPolynomial univariate(int i)
i
- the index of the variable.public ExprPolynomial univariate(int i, long e)
i
- the index of the variable.e
- the exponent of the variable.public ExprPolynomial univariate(int modv, int i, long e)
modv
- number of module variables.i
- the index of the variable.e
- the exponent of the variable.public java.util.List<ExprPolynomial> getGenerators()
public java.util.List<ExprPolynomial> generators()
ElemFactory.generators()
public java.util.List<ExprPolynomial> generators(int modv)
modv
- number of module variablespublic boolean isFinite()
ElemFactory.isFinite()
public java.util.List<? extends ExprPolynomial> univariateList()
public java.util.List<? extends ExprPolynomial> univariateList(int modv)
modv
- number of module variables.public java.util.List<? extends ExprPolynomial> univariateList(int modv, long e)
modv
- number of module variables.e
- the exponent of the variables.public ExprPolynomialRing extend(IAST vn)
vn
- names for extended variables.public ExprPolynomialRing extendLower(IAST vn)
vn
- names for extended lower variables.public ExprPolynomialRing distribute()
public ExprPolynomialComparator getComparator()
public ExprPolynomialComparator getComparator(boolean rev)
rev
- for reverse comparator.public static void addVars(IAST vars)
vars
- variable names to be recorded.public static java.lang.String[] permuteVars(java.util.List<java.lang.Integer> P, java.lang.String[] vars)
vars
- variable names.P
- permutation.public java.util.Iterator<ExprPolynomial> iterator()