edu.jas.application
Class LocalSolvablePolynomialRing<C extends GcdRingElem<C>>
- java.lang.Object
-
- edu.jas.poly.GenPolynomialRing<C>
-
- edu.jas.poly.GenSolvablePolynomialRing<SolvableLocal<C>>
-
- edu.jas.application.LocalSolvablePolynomialRing<C>
-
- Type Parameters:
C- coefficient type.
- All Implemented Interfaces:
- AbelianGroupFactory<GenPolynomial<SolvableLocal<C>>>, ElemFactory<GenPolynomial<SolvableLocal<C>>>, MonoidFactory<GenPolynomial<SolvableLocal<C>>>, RingFactory<GenPolynomial<SolvableLocal<C>>>, java.io.Serializable, java.lang.Iterable<GenPolynomial<SolvableLocal<C>>>
public class LocalSolvablePolynomialRing<C extends GcdRingElem<C>> extends GenSolvablePolynomialRing<SolvableLocal<C>>
LocalSolvablePolynomialRing generic recursive solvable polynomial factory implementing RingFactory and extending GenSolvablePolynomialRing factory. Factory for n-variate ordered solvable polynomials over solvable polynomial coefficients. The non-commutative multiplication relations are maintained in a relation table and the non-commutative multiplication relations between the coefficients and the main variables are maintained in a coefficient relation table. Almost immutable object, except variable names and relation table contents.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description LocalSolvablePolynomial<C>ONEThe constant polynomial 1 for this ring.RecSolvablePolynomialRing<C>polCoeffRecursive solvable polynomial ring with polynomial coefficients.LocalSolvablePolynomial<C>ZEROThe constant polynomial 0 for this ring.-
Fields inherited from class edu.jas.poly.GenSolvablePolynomialRing
table
-
Fields inherited from class edu.jas.poly.GenPolynomialRing
coFac, evzero, nvar, tord
-
-
Constructor Summary
Constructors Constructor and Description LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, GenSolvablePolynomialRing o)The constructor creates a solvable 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 and the solvable multiplication relations are empty.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n)The constructor creates a solvable polynomial factory object with the default term order and commutative relations.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, RelationTable<SolvableLocal<C>> rt)The constructor creates a solvable polynomial factory object with the default term order.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, TermOrder t)The constructor creates a solvable polynomial factory object with the given term order and commutative relations.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, TermOrder t, RelationTable<SolvableLocal<C>> rt)The constructor creates a solvable polynomial factory object with the given term order.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, TermOrder t, java.lang.String[] v)The constructor creates a solvable polynomial factory object with the given term order and commutative relations.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, TermOrder t, java.lang.String[] v, RelationTable<SolvableLocal<C>> rt)The constructor creates a solvable polynomial factory object with the given term order.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, LocalSolvablePolynomialRing o)The constructor creates a solvable 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 and the solvable multiplication relations are empty.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, java.lang.String[] v)The constructor creates a solvable polynomial factory object with the default term order.LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, TermOrder t, java.lang.String[] v)The constructor creates a solvable polynomial factory object with the given term order and commutative relations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description LocalSolvablePolynomialRing<C>contract(int i)Contract variables.LocalSolvablePolynomial<C>copy(LocalSolvablePolynomial<C> c)Copy polynomial c.booleanequals(java.lang.Object other)Comparison with any other object.LocalSolvablePolynomialRing<C>extend(int i)Extend variables.LocalSolvablePolynomial<C>fromInteger(java.math.BigInteger a)Get a (constant) LocalSolvablePolynomial<C> element from a BigInteger value.LocalSolvablePolynomial<C>fromInteger(long a)Get a (constant) LocalSolvablePolynomial<C> element from a long value.LocalSolvablePolynomial<C>fromPolyCoefficients(GenSolvablePolynomial<GenPolynomial<C>> A)Rational function from integral polynomial coefficients.LocalSolvablePolynomial<C>getONE()Get the one element.LocalSolvablePolynomial<C>getZERO()Get the zero element.inthashCode()Hash code for this polynomial ring.booleanisAssociative()Query if this ring is associative.booleanisCommutative()Query if this ring is commutative.LocalSolvablePolynomial<C>parse(java.io.Reader r)Parse a solvable polynomial with the use of GenPolynomialTokenizerLocalSolvablePolynomial<C>parse(java.lang.String s)Parse a solvable polynomial with the use of GenPolynomialTokenizerLocalSolvablePolynomial<C>random(int n)Random solvable polynomial.LocalSolvablePolynomial<C>random(int k, int l, int d, float q)Generate a random solvable polynomial.LocalSolvablePolynomial<C>random(int k, int l, int d, float q, java.util.Random rnd)Random solvable polynomial.LocalSolvablePolynomial<C>random(int n, java.util.Random rnd)Random solvable polynomial.java.util.List<LocalSolvablePolynomial<C>>recUnivariateList()Generate list of univariate polynomials in all variables.java.util.List<LocalSolvablePolynomial<C>>recUnivariateList(int modv)Generate list of univariate polynomials in all variables.java.util.List<LocalSolvablePolynomial<C>>recUnivariateList(int modv, long e)Generate list of univariate polynomials in all variables with given exponent.LocalSolvablePolynomialRing<C>reverse()Reverse variables.LocalSolvablePolynomialRing<C>reverse(boolean partial)Reverse variables.RecSolvablePolynomial<C>toPolyCoefficients(GenPolynomial<SolvableLocal<C>> A)Integral function from rational polynomial coefficients.RecSolvablePolynomial<C>toPolyCoefficients(LocalSolvablePolynomial<C> A)Integral function from rational polynomial coefficients.java.lang.StringtoScript()Get a scripting compatible string representation.java.lang.StringtoString()Get the String representation.LocalSolvablePolynomial<C>univariate(int i)Generate univariate solvable polynomial in a given variable.LocalSolvablePolynomial<C>univariate(int modv, int i, long e)Generate univariate solvable polynomial in a given variable with given exponent.LocalSolvablePolynomial<C>univariate(int i, long e)Generate univariate solvable polynomial in a given variable with given exponent.-
Methods inherited from class edu.jas.poly.GenSolvablePolynomialRing
addRelations, addRelations, addSolvRelations, copy, distribute, extend, recursive, univariateList, univariateList, univariateList
-
Methods inherited from class edu.jas.poly.GenPolynomialRing
addVars, characteristic, copy, copy, extendLower, extendLower, generators, getComparator, getComparator, getGenerators, getONECoefficient, getVars, getZEROCoefficient, isField, isFinite, iterator, newVars, newVars, newVars, newVars, setVars, valueOf, valueOf, valueOf, varsToString
-
-
-
-
Field Detail
-
polCoeff
public final RecSolvablePolynomialRing<C extends GcdRingElem<C>> polCoeff
Recursive solvable polynomial ring with polynomial coefficients.
-
ZERO
public final LocalSolvablePolynomial<C extends GcdRingElem<C>> ZERO
The constant polynomial 0 for this ring. Hides super ZERO.
-
ONE
public final LocalSolvablePolynomial<C extends GcdRingElem<C>> ONE
The constant polynomial 1 for this ring. Hides super ONE.
-
-
Constructor Detail
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n)
The constructor creates a solvable polynomial factory object with the default term order and commutative relations.- Parameters:
cf- factory for coefficients of type C.n- number of variables.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, RelationTable<SolvableLocal<C>> rt)
The constructor creates a solvable polynomial factory object with the default term order.- Parameters:
cf- factory for coefficients of type C.n- number of variables.rt- solvable multiplication relations.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, TermOrder t)
The constructor creates a solvable polynomial factory object with the given term order and commutative relations.- Parameters:
cf- factory for coefficients of type C.n- number of variables.t- a term order.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, TermOrder t, RelationTable<SolvableLocal<C>> rt)
The constructor creates a solvable polynomial factory object with the given term order.- Parameters:
cf- factory for coefficients of type C.n- number of variables.t- a term order.rt- solvable multiplication relations.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, TermOrder t, java.lang.String[] v)
The constructor creates a solvable polynomial factory object with the given term order and commutative relations.- Parameters:
cf- factory for coefficients of type C.n- number of variables.t- a term order.v- names for the variables.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, TermOrder t, java.lang.String[] v)
The constructor creates a solvable polynomial factory object with the given term order and commutative relations.- Parameters:
cf- factory for coefficients of type C.t- a term order.v- names for the variables.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, java.lang.String[] v)
The constructor creates a solvable polynomial factory object with the default term order.- Parameters:
cf- factory for coefficients of type C.v- names for the variables.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, int n, TermOrder t, java.lang.String[] v, RelationTable<SolvableLocal<C>> rt)
The constructor creates a solvable polynomial factory object with the given term order.- Parameters:
cf- factory for coefficients of type C.n- number of variables.t- a term order.v- names for the variables.rt- solvable multiplication relations.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, GenSolvablePolynomialRing o)
The constructor creates a solvable 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 and the solvable multiplication relations are empty.- Parameters:
cf- factory for coefficients of type C.o- other solvable polynomial ring.
-
LocalSolvablePolynomialRing
public LocalSolvablePolynomialRing(RingFactory<SolvableLocal<C>> cf, LocalSolvablePolynomialRing o)
The constructor creates a solvable 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 and the solvable multiplication relations are empty.- Parameters:
cf- factory for coefficients of type C.o- other solvable polynomial ring.
-
-
Method Detail
-
toString
public java.lang.String toString()
Get the String representation.- Overrides:
toStringin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- See Also:
Object.toString()
-
toScript
public java.lang.String toScript()
Get a scripting compatible string representation.- Specified by:
toScriptin interfaceElemFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
toScriptin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Returns:
- script compatible representation for this Element.
- See Also:
Element.toScript()
-
equals
public boolean equals(java.lang.Object other)
Comparison with any other object.- Overrides:
equalsin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Hash code for this polynomial ring.- Overrides:
hashCodein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- See Also:
Object.hashCode()
-
getZERO
public LocalSolvablePolynomial<C> getZERO()
Get the zero element.- Specified by:
getZEROin interfaceAbelianGroupFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
getZEROin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Returns:
- 0 as LocalSolvablePolynomial
.
-
getONE
public LocalSolvablePolynomial<C> getONE()
Get the one element.- Specified by:
getONEin interfaceMonoidFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
getONEin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Returns:
- 1 as LocalSolvablePolynomial
.
-
isCommutative
public boolean isCommutative()
Query if this ring is commutative.- Specified by:
isCommutativein interfaceMonoidFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
isCommutativein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Returns:
- true if this ring is commutative, else false.
-
isAssociative
public boolean isAssociative()
Query if this ring is associative. Test if the relations between the mian variables and the coefficient generators define an associative solvable ring.- Specified by:
isAssociativein interfaceMonoidFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
isAssociativein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Returns:
- true, if this ring is associative, else false.
-
fromInteger
public LocalSolvablePolynomial<C> fromInteger(long a)
Get a (constant) LocalSolvablePolynomial<C> element from a long value.- Specified by:
fromIntegerin interfaceElemFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
fromIntegerin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
a- long.- Returns:
- a LocalSolvablePolynomial<C>.
-
fromInteger
public LocalSolvablePolynomial<C> fromInteger(java.math.BigInteger a)
Get a (constant) LocalSolvablePolynomial<C> element from a BigInteger value.- Specified by:
fromIntegerin interfaceElemFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
fromIntegerin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
a- BigInteger.- Returns:
- a LocalSolvablePolynomial<C>.
-
random
public LocalSolvablePolynomial<C> random(int n)
Random solvable polynomial. Generates a random solvable polynomial with k = 5, l = n, d = (nvar == 1) ? n : 3, q = (nvar == 1) ? 0.7 : 0.3.- Specified by:
randomin interfaceElemFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
randomin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
n- number of terms.- Returns:
- a random solvable polynomial.
-
random
public LocalSolvablePolynomial<C> random(int n, java.util.Random rnd)
Random solvable polynomial. Generates a random solvable polynomial with k = 5, l = n, d = (nvar == 1) ? n : 3, q = (nvar == 1) ? 0.7 : 0.3.- Specified by:
randomin interfaceElemFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
randomin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
n- number of terms.rnd- is a source for random bits.- Returns:
- a random solvable polynomial.
-
random
public LocalSolvablePolynomial<C> random(int k, int l, int d, float q)
Generate a random solvable polynomial.- Overrides:
randomin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
k- bitsize of random coefficients.l- number of terms.d- maximal degree in each variable.q- density of nozero exponents.- Returns:
- a random solvable polynomial.
-
random
public LocalSolvablePolynomial<C> random(int k, int l, int d, float q, java.util.Random rnd)
Random solvable polynomial.- Overrides:
randomin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
k- size 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.- Returns:
- a random solvable polynomial.
-
copy
public LocalSolvablePolynomial<C> copy(LocalSolvablePolynomial<C> c)
Copy polynomial c.- Parameters:
c-- Returns:
- a copy of c.
-
parse
public LocalSolvablePolynomial<C> parse(java.lang.String s)
Parse a solvable polynomial with the use of GenPolynomialTokenizer- Specified by:
parsein interfaceElemFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
parsein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
s- String.- Returns:
- LocalSolvablePolynomial from s.
-
parse
public LocalSolvablePolynomial<C> parse(java.io.Reader r)
Parse a solvable polynomial with the use of GenPolynomialTokenizer- Specified by:
parsein interfaceElemFactory<GenPolynomial<SolvableLocal<C extends GcdRingElem<C>>>>- Overrides:
parsein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
r- Reader.- Returns:
- next LocalSolvablePolynomial from r.
-
univariate
public LocalSolvablePolynomial<C> univariate(int i)
Generate univariate solvable polynomial in a given variable.- Overrides:
univariatein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
i- the index of the variable.- Returns:
- X_i as solvable univariate polynomial.
-
univariate
public LocalSolvablePolynomial<C> univariate(int i, long e)
Generate univariate solvable polynomial in a given variable with given exponent.- Overrides:
univariatein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
i- the index of the variable.e- the exponent of the variable.- Returns:
- X_i^e as solvable univariate polynomial.
-
univariate
public LocalSolvablePolynomial<C> univariate(int modv, int i, long e)
Generate univariate solvable polynomial in a given variable with given exponent.- Overrides:
univariatein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
modv- number of module variables.i- the index of the variable.e- the exponent of the variable.- Returns:
- X_i^e as solvable univariate polynomial.
-
recUnivariateList
public java.util.List<LocalSolvablePolynomial<C>> recUnivariateList()
Generate list of univariate polynomials in all variables.- Returns:
- List(X_1,...,X_n) a list of univariate polynomials.
-
recUnivariateList
public java.util.List<LocalSolvablePolynomial<C>> recUnivariateList(int modv)
Generate list of univariate polynomials in all variables.- Parameters:
modv- number of module variables.- Returns:
- List(X_1,...,X_n) a list of univariate polynomials.
-
recUnivariateList
public java.util.List<LocalSolvablePolynomial<C>> recUnivariateList(int modv, long e)
Generate list of univariate polynomials in all variables with given exponent.- Parameters:
modv- number of module variables.e- the exponent of the variables.- Returns:
- List(X_1^e,...,X_n^e) a list of univariate polynomials.
-
extend
public LocalSolvablePolynomialRing<C> extend(int i)
Extend variables. Used e.g. in module embedding. Extend number of variables by i.- Overrides:
extendin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
i- number of variables to extend.- Returns:
- extended solvable polynomial ring factory.
-
contract
public LocalSolvablePolynomialRing<C> contract(int i)
Contract variables. Used e.g. in module embedding. Contract number of variables by i.- Overrides:
contractin classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
i- number of variables to remove.- Returns:
- contracted solvable polynomial ring factory.
-
reverse
public LocalSolvablePolynomialRing<C> reverse()
Reverse variables. Used e.g. in opposite rings.- Overrides:
reversein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Returns:
- solvable polynomial ring factory with reversed variables.
-
reverse
public LocalSolvablePolynomialRing<C> reverse(boolean partial)
Reverse variables. Used e.g. in opposite rings.- Overrides:
reversein classGenSolvablePolynomialRing<SolvableLocal<C extends GcdRingElem<C>>>- Parameters:
partial- true for partialy reversed term orders.- Returns:
- solvable polynomial ring factory with reversed variables.
-
fromPolyCoefficients
public LocalSolvablePolynomial<C> fromPolyCoefficients(GenSolvablePolynomial<GenPolynomial<C>> A)
Rational function from integral polynomial coefficients. Represent as polynomial with type SolvableLocalcoefficients. - Parameters:
A- polynomial with integral polynomial coefficients to be converted.- Returns:
- polynomial with type SolvableLocal
coefficients.
-
toPolyCoefficients
public RecSolvablePolynomial<C> toPolyCoefficients(LocalSolvablePolynomial<C> A)
Integral function from rational polynomial coefficients. Represent as polynomial with type GenSolvablePolynomialcoefficients. - Parameters:
A- polynomial with rational polynomial coefficients to be converted.- Returns:
- polynomial with type GenSolvablePolynomial
coefficients.
-
toPolyCoefficients
public RecSolvablePolynomial<C> toPolyCoefficients(GenPolynomial<SolvableLocal<C>> A)
Integral function from rational polynomial coefficients. Represent as polynomial with type GenSolvablePolynomialcoefficients. - Parameters:
A- polynomial with rational polynomial coefficients to be converted.- Returns:
- polynomial with type GenSolvablePolynomial
coefficients.
-
-
DMelt 3.0 © DataMelt by jWork.ORG