|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.jas.poly.GenPolynomialRing<C>
public 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,
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. |
|
| Method Summary | |
|---|---|
java.math.BigInteger |
characteristic()
Characteristic of this ring. |
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. |
GenPolynomial<C> |
fromInteger(java.math.BigInteger a)
Get a (constant) GenPolynomial |
GenPolynomial<C> |
fromInteger(long a)
Get a (constant) GenPolynomial |
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. |
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<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 |
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 |
|---|
clone, 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,
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,
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.| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public boolean equals(java.lang.Object other)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class java.lang.ObjectObject.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<? 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> contract(int i)
i - number of variables to remove.
public GenPolynomialRing<C> reverse()
public GenPolynomialRing<C> reverse(boolean partial)
partial - true for partialy reversed term orders.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||