|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.jas.poly.GenPolynomialRing<C>
C
- coefficient typepublic class GenPolynomialRing<C extends RingElem<C>>
GenPolynomialRing generic polynomial factory implementing RingFactory; Factory for n-variate ordered polynomials over C. Almost immutable object, except variable names.
Field Summary | |
---|---|
RingFactory<C> |
coFac
The factory for the coefficients. |
ExpVector |
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. |
GenPolynomial<C> |
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. |
TermOrder |
tord
The term order. |
protected java.lang.String[] |
vars
The names of the variables. |
GenPolynomial<C> |
ZERO
The constant polynomial 0 for this ring. |
Constructor Summary | |
---|---|
GenPolynomialRing(RingFactory<C> cf,
GenPolynomialRing 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. |
|
GenPolynomialRing(RingFactory<C> cf,
int n)
The constructor creates a polynomial factory object with the default term order. |
|
GenPolynomialRing(RingFactory<C> cf,
int n,
java.lang.String[] v)
The constructor creates a polynomial factory object. |
|
GenPolynomialRing(RingFactory<C> cf,
int n,
TermOrder t)
The constructor creates a polynomial factory object. |
|
GenPolynomialRing(RingFactory<C> cf,
int n,
TermOrder t,
java.lang.String[] v)
The constructor creates a polynomial factory object. |
|
GenPolynomialRing(RingFactory<C> cf,
java.lang.String[] v)
The constructor creates a polynomial factory object. |
|
GenPolynomialRing(RingFactory<C> cf,
TermOrder t,
java.lang.String[] v)
The constructor creates a polynomial factory object. |
Method Summary | |
---|---|
static void |
addVars(java.lang.String[] vars)
Add variable names. |
java.math.BigInteger |
characteristic()
Characteristic of this ring. |
GenPolynomialRing<C> |
clone()
Clone this factory. |
GenPolynomialRing<C> |
contract(int i)
Contract variables. |
GenPolynomial<C> |
copy(GenPolynomial<C> c)
Copy polynomial c. |
boolean |
equals(java.lang.Object other)
Comparison with any other object. |
GenPolynomialRing<C> |
extend(int i)
Extend variables. |
GenPolynomialRing<C> |
extend(java.lang.String[] vn)
Extend variables. |
GenPolynomialRing<C> |
extendLower(int i)
Extend lower variables. |
GenPolynomialRing<C> |
extendLower(java.lang.String[] vn)
Extend lower variables. |
GenPolynomial<C> |
fromInteger(java.math.BigInteger a)
Get a (constant) GenPolynomial<C> element from a BigInteger value. |
GenPolynomial<C> |
fromInteger(long a)
Get a (constant) GenPolynomial<C> element from a long value. |
java.util.List<GenPolynomial<C>> |
generators()
Get a list of the generating elements. |
PolynomialComparator<C> |
getComparator()
Get PolynomialComparator. |
PolynomialComparator<C> |
getComparator(boolean rev)
Get PolynomialComparator. |
java.util.List<GenPolynomial<C>> |
getGenerators()
Get the generating elements excluding the generators for the coefficient ring. |
GenPolynomial<C> |
getONE()
Get the one element. |
C |
getONECoefficient()
Get the one element from the coefficients. |
java.lang.String[] |
getVars()
Get the variable names. |
GenPolynomial<C> |
getZERO()
Get the zero element. |
C |
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. |
java.util.Iterator<GenPolynomial<C>> |
iterator()
Get a GenPolynomial iterator. |
java.lang.String[] |
newVars()
New variable names. |
static java.lang.String[] |
newVars(int n)
New variable names. |
java.lang.String[] |
newVars(java.lang.String prefix)
New variable names. |
static java.lang.String[] |
newVars(java.lang.String prefix,
int n)
New variable names. |
GenPolynomial<C> |
parse(java.io.Reader r)
Parse a polynomial with the use of GenPolynomialTokenizer. |
GenPolynomial<C> |
parse(java.lang.String s)
Parse a polynomial with the use of GenPolynomialTokenizer. |
GenPolynomial<C> |
random(int n)
Random polynomial. |
GenPolynomial<C> |
random(int k,
int l,
int d,
float q)
Generate a random polynomial. |
GenPolynomial<C> |
random(int k,
int l,
int d,
float q,
java.util.Random rnd)
Generate a random polynomial. |
GenPolynomial<C> |
random(int n,
java.util.Random rnd)
Random polynomial. |
GenPolynomialRing<GenPolynomial<C>> |
recursive(int i)
Recursive representation as polynomial with i main variables. |
GenPolynomialRing<C> |
reverse()
Reverse variables. |
GenPolynomialRing<C> |
reverse(boolean partial)
Reverse variables. |
java.lang.String[] |
setVars(java.lang.String[] v)
Set the variable names. |
java.lang.String |
toScript()
Get a scripting compatible string representation. |
java.lang.String |
toString()
Get the String representation. |
GenPolynomial<C> |
univariate(int i)
Generate univariate polynomial in a given variable. |
GenPolynomial<C> |
univariate(int modv,
int i,
long e)
Generate univariate polynomial in a given variable with given exponent. |
GenPolynomial<C> |
univariate(int i,
long e)
Generate univariate polynomial in a given variable with given exponent. |
java.util.List<? extends GenPolynomial<C>> |
univariateList()
Generate list of univariate polynomials in all variables. |
java.util.List<? extends GenPolynomial<C>> |
univariateList(int modv)
Generate list of univariate polynomials in all variables. |
java.util.List<? extends GenPolynomial<C>> |
univariateList(int modv,
long e)
Generate list of univariate polynomials in all variables with given exponent. |
java.lang.String |
varsToString()
Get a String representation of the variable names. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final RingFactory<C extends RingElem<C>> coFac
public final int nvar
public final TermOrder tord
protected boolean partial
protected java.lang.String[] vars
public final GenPolynomial<C extends RingElem<C>> ZERO
public final GenPolynomial<C extends RingElem<C>> ONE
public final ExpVector evzero
protected static final java.util.Random random
protected int isField
Constructor Detail |
---|
public GenPolynomialRing(RingFactory<C> cf, int n)
cf
- factory for coefficients of type C.n
- number of variables.public GenPolynomialRing(RingFactory<C> cf, int n, TermOrder t)
cf
- factory for coefficients of type C.n
- number of variables.t
- a term order.public GenPolynomialRing(RingFactory<C> cf, java.lang.String[] v)
cf
- factory for coefficients of type C.v
- names for the variables.public GenPolynomialRing(RingFactory<C> cf, int n, java.lang.String[] v)
cf
- factory for coefficients of type C.n
- number of variables.v
- names for the variables.public GenPolynomialRing(RingFactory<C> cf, TermOrder t, java.lang.String[] v)
cf
- factory for coefficients of type C.t
- a term order.v
- names for the variables.public GenPolynomialRing(RingFactory<C> cf, int n, TermOrder t, java.lang.String[] v)
cf
- factory for coefficients of type C.n
- number of variables.t
- a term order.v
- names for the variables.public GenPolynomialRing(RingFactory<C> cf, GenPolynomialRing o)
cf
- factory for coefficients of type C.o
- other polynomial ring.Method Detail |
---|
public GenPolynomialRing<C> clone()
clone
in class java.lang.Object
Object.clone()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toScript()
toScript
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
Element.toScript()
public 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 java.lang.String[] getVars()
public java.lang.String[] setVars(java.lang.String[] v)
public java.lang.String varsToString()
public C getZEROCoefficient()
public C getONECoefficient()
public GenPolynomial<C> getZERO()
getZERO
in interface AbelianGroupFactory<GenPolynomial<C extends RingElem<C>>>
public GenPolynomial<C> getONE()
getONE
in interface MonoidFactory<GenPolynomial<C extends RingElem<C>>>
public boolean isCommutative()
isCommutative
in interface MonoidFactory<GenPolynomial<C extends RingElem<C>>>
public boolean isAssociative()
isAssociative
in interface MonoidFactory<GenPolynomial<C extends RingElem<C>>>
public boolean isField()
isField
in interface RingFactory<GenPolynomial<C extends RingElem<C>>>
public java.math.BigInteger characteristic()
characteristic
in interface RingFactory<GenPolynomial<C extends RingElem<C>>>
public GenPolynomial<C> fromInteger(long a)
fromInteger
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
a
- long.
public GenPolynomial<C> fromInteger(java.math.BigInteger a)
fromInteger
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
a
- BigInteger.
public GenPolynomial<C> random(int n)
random
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
n
- number of terms.
public GenPolynomial<C> random(int n, java.util.Random rnd)
random
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
n
- number of terms.rnd
- is a source for random bits.
public GenPolynomial<C> random(int k, int l, int d, float q)
k
- bitsize of random coefficients.l
- number of terms.d
- maximal degree in each variable.q
- density of nozero exponents.
public GenPolynomial<C> random(int k, int l, int d, float q, java.util.Random rnd)
k
- bitsize of random coefficients.l
- number of terms.d
- maximal degree in each variable.q
- density of nozero exponents.rnd
- is a source for random bits.
public GenPolynomial<C> copy(GenPolynomial<C> c)
copy
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
c
-
public GenPolynomial<C> parse(java.lang.String s)
parse
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
s
- String.
public GenPolynomial<C> parse(java.io.Reader r)
parse
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
r
- Reader.
public GenPolynomial<C> univariate(int i)
i
- the index of the variable.
public GenPolynomial<C> univariate(int i, long e)
i
- the index of the variable.e
- the exponent of the variable.
public GenPolynomial<C> 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<GenPolynomial<C>> getGenerators()
public java.util.List<GenPolynomial<C>> generators()
generators
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
ElemFactory.generators()
public boolean isFinite()
isFinite
in interface ElemFactory<GenPolynomial<C extends RingElem<C>>>
ElemFactory.isFinite()
public java.util.List<? extends GenPolynomial<C>> univariateList()
public java.util.List<? extends GenPolynomial<C>> univariateList(int modv)
modv
- number of module variables.
public java.util.List<? extends GenPolynomial<C>> univariateList(int modv, long e)
modv
- number of module variables.e
- the exponent of the variables.
public GenPolynomialRing<C> extend(int i)
i
- number of variables to extend.
public GenPolynomialRing<C> extend(java.lang.String[] vn)
vn
- names for extended variables.
public GenPolynomialRing<C> extendLower(int i)
i
- number of variables to extend.
public GenPolynomialRing<C> extendLower(java.lang.String[] vn)
vn
- names for extended lower variables.
public GenPolynomialRing<C> contract(int i)
i
- number of variables to remove.
public GenPolynomialRing<GenPolynomial<C>> recursive(int i)
i
- number of main variables.
public GenPolynomialRing<C> reverse()
public GenPolynomialRing<C> reverse(boolean partial)
partial
- true for partialy reversed term orders.
public PolynomialComparator<C> getComparator()
public PolynomialComparator<C> getComparator(boolean rev)
rev
- for reverse comparator.
public static java.lang.String[] newVars(java.lang.String prefix, int n)
prefix
- name prefix.n
- number of variables.
public java.lang.String[] newVars(java.lang.String prefix)
prefix
- name prefix.
public static java.lang.String[] newVars(int n)
n
- number of variables.
public java.lang.String[] newVars()
public static void addVars(java.lang.String[] vars)
vars
- variable names to be recorded.public java.util.Iterator<GenPolynomial<C>> iterator()
iterator
in interface java.lang.Iterable<GenPolynomial<C extends RingElem<C>>>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |