Class RecSolvablePolynomialRing<C extends RingElem<C>>
- Type Parameters:
C- coefficient type.
- All Implemented Interfaces:
AbelianGroupFactory<GenPolynomial<GenPolynomial<C>>>, ElemFactory<GenPolynomial<GenPolynomial<C>>>, MonoidFactory<GenPolynomial<GenPolynomial<C>>>, RingFactory<GenPolynomial<GenPolynomial<C>>>, Serializable, Iterable<GenPolynomial<GenPolynomial<C>>>
public class RecSolvablePolynomialRing<C extends RingElem<C>>
extends GenSolvablePolynomialRing<GenPolynomial<C>>
RecSolvablePolynomialRing 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 variables are maintained in a coefficient-polynomial
relation table. Almost immutable object, except variable names and relation
table contents.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal RelationTable<GenPolynomial<C>> The solvable multiplication relations between variables and coefficients.private static final org.apache.logging.log4j.LoggerThe constant polynomial 1 for this ring.The constant polynomial 0 for this ring.Fields inherited from class GenSolvablePolynomialRing
table -
Constructor Summary
ConstructorsConstructorDescriptionRecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n) The constructor creates a solvable polynomial factory object with the default term order and commutative relations.RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n, RelationTable<GenPolynomial<C>> rt) The constructor creates a solvable polynomial factory object with the default term order.RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n, TermOrder t) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n, TermOrder t, RelationTable<GenPolynomial<C>> rt) The constructor creates a solvable polynomial factory object with the given term order.RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n, TermOrder t, String[] v) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n, TermOrder t, String[] v, RelationTable<GenPolynomial<C>> rt) The constructor creates a solvable polynomial factory object with the given term order.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.RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, TermOrder t, String[] v) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, String[] v) The constructor creates a solvable polynomial factory object with the default term order. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCoeffRelations(List<GenPolynomial<GenPolynomial<C>>> rel) Generate the coefficient relation table of the solvable polynomial ring from a polynomial list of relations.voidGenerate the coefficient relation table of the solvable polynomial ring from a solvable polynomial list of relations.contract(int i) Contract variables.Copy polynomial c.static <C extends RingElem<C>>
GenSolvablePolynomialRing<C> Distributive representation as polynomial with all main variables.booleanComparison with any other object.extend(int i) Extend variables.extend(int i, boolean top) Extend variables.Extend variables.Extend variables.fromInteger(long a) Get a (constant) RecSolvablePolynomial<C> element from a long valueGet a (constant) RecSolvablePolynomial<C> element from a BigInteger value.getONE()Get the one element.getZERO()Get the zero element.inthashCode()Hash code for this polynomial ring.booleanQuery if this ring is associative.booleanQuery if this ring is commutative.Parse a solvable polynomial with the use of GenPolynomialTokenizerParse a solvable polynomial with the use of GenPolynomialTokenizerpermutation(List<Integer> P) Permutation of polynomial ring variables.random(int n) Random solvable polynomial.random(int k, int l, int d, float q) Generate a random solvable polynomial.Random solvable polynomial.Random solvable polynomial.reverse()Reverse variables.reverse(boolean partial) Reverse variables.toScript()Get a scripting compatible string representation.toString()Get the String representation.univariate(int i) Generate univariate solvable polynomial in a given variable.univariate(int modv, int i, long e) Generate univariate solvable polynomial in a given variable with given exponent.univariate(int i, long e) Generate univariate solvable polynomial in a given variable with given exponent.Generate list of univariate polynomials in all variables.univariateList(int modv) Generate list of univariate polynomials in all variables.univariateList(int modv, long e) Generate list of univariate polynomials in all variables with given exponent.Get a RecSolvablePolynomial<C> element from an exponent vector.valueOf(GenPolynomial<C> a) Get a (constant) RecSolvablePolynomial<C> element from a coefficient value.valueOf(GenPolynomial<C> a, ExpVector e) Get a RecSolvablePolynomial<C> element from a coefficient and an exponent vector.Methods inherited from class GenSolvablePolynomialRing
addRelations, addRelations, addSolvRelations, copy, distribute, recursiveMethods inherited from class GenPolynomialRing
characteristic, charPolynomial, copy, copy, copy, determinant, determinantFromCharPol, extendLower, extendLower, extendLower, fromVector, generators, generators, getComparator, getComparator, getCreations, getGenerators, getONECoefficient, getVars, getZEROCoefficient, isField, isFinite, iterator, newVars, newVars, newVars, newVars, permuteVars, setVars, toScript, traceFromCharPol, univariate, univariate, valueOf, valueOf, varsToStringMethods inherited from interface ElemFactory
valueOfMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
coeffTable
The solvable multiplication relations between variables and coefficients. -
ZERO
The constant polynomial 0 for this ring. Hides super ZERO. -
ONE
The constant polynomial 1 for this ring. Hides super ONE. -
logger
private static final org.apache.logging.log4j.Logger logger
-
-
Constructor Details
-
RecSolvablePolynomialRing
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.
-
RecSolvablePolynomialRing
public RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n, RelationTable<GenPolynomial<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.
-
RecSolvablePolynomialRing
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.
-
RecSolvablePolynomialRing
public RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n, TermOrder t, RelationTable<GenPolynomial<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.
-
RecSolvablePolynomialRing
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.
-
RecSolvablePolynomialRing
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.
-
RecSolvablePolynomialRing
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.
-
RecSolvablePolynomialRing
public RecSolvablePolynomialRing(RingFactory<GenPolynomial<C>> cf, int n, TermOrder t, String[] v, RelationTable<GenPolynomial<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.
-
RecSolvablePolynomialRing
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 Details
-
addCoeffRelations
Generate the coefficient relation table of the solvable polynomial ring from a polynomial list of relations.- Parameters:
rel- polynomial list of relations [..., ei, fj, pij, ... ] with ei * fj = pij.
-
addSolvCoeffRelations
Generate the coefficient relation table of the solvable polynomial ring from a solvable polynomial list of relations.- Parameters:
rel- solvable polynomial list of relations [..., ei, fj, pij, ... ] with ei * fj = pij.
-
toString
Get the String representation.- Overrides:
toStringin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- See Also:
-
toScript
Get a scripting compatible string representation.- Specified by:
toScriptin interfaceElemFactory<C extends RingElem<C>>- Overrides:
toScriptin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Returns:
- script compatible representation for this Element.
- See Also:
-
equals
Comparison with any other object.- Overrides:
equalsin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- See Also:
-
hashCode
public int hashCode()Hash code for this polynomial ring.- Overrides:
hashCodein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- See Also:
-
getZERO
Get the zero element.- Specified by:
getZEROin interfaceAbelianGroupFactory<C extends RingElem<C>>- Overrides:
getZEROin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Returns:
- 0 as RecSolvablePolynomial
.
-
getONE
Get the one element.- Specified by:
getONEin interfaceMonoidFactory<C extends RingElem<C>>- Overrides:
getONEin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Returns:
- 1 as RecSolvablePolynomial
.
-
isCommutative
public boolean isCommutative()Query if this ring is commutative.- Specified by:
isCommutativein interfaceMonoidFactory<C extends RingElem<C>>- Overrides:
isCommutativein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<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<C extends RingElem<C>>- Overrides:
isAssociativein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Returns:
- true, if this ring is associative, else false.
-
valueOf
Get a (constant) RecSolvablePolynomial<C> element from a coefficient value.- Overrides:
valueOfin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
a- coefficient.- Returns:
- a RecSolvablePolynomial<C>.
-
valueOf
Get a RecSolvablePolynomial<C> element from an exponent vector.- Overrides:
valueOfin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
e- exponent vector.- Returns:
- a RecSolvablePolynomial<C>.
-
valueOf
Get a RecSolvablePolynomial<C> element from a coefficient and an exponent vector.- Overrides:
valueOfin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
a- coefficient.e- exponent vector.- Returns:
- a RecSolvablePolynomial<C>.
-
fromInteger
Get a (constant) RecSolvablePolynomial<C> element from a long value- Specified by:
fromIntegerin interfaceElemFactory<C extends RingElem<C>>- Overrides:
fromIntegerin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
a- long.- Returns:
- a RecSolvablePolynomial<C>.
-
fromInteger
Get a (constant) RecSolvablePolynomial<C> element from a BigInteger value.- Specified by:
fromIntegerin interfaceElemFactory<C extends RingElem<C>>- Overrides:
fromIntegerin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
a- BigInteger.- Returns:
- a RecSolvablePolynomial<C>.
-
random
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<C extends RingElem<C>>- Overrides:
randomin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
n- number of terms.- Returns:
- a random solvable polynomial.
-
random
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<C extends RingElem<C>>- Overrides:
randomin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
n- number of terms.rnd- is a source for random bits.- Returns:
- a random solvable polynomial.
-
random
Generate a random solvable polynomial.- Overrides:
randomin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<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
Random solvable polynomial.- Overrides:
randomin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<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
Copy polynomial c.- Parameters:
c-- Returns:
- a copy of c.
-
parse
Parse a solvable polynomial with the use of GenPolynomialTokenizer- Specified by:
parsein interfaceElemFactory<C extends RingElem<C>>- Overrides:
parsein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
s- String.- Returns:
- RecSolvablePolynomial from s.
-
parse
Parse a solvable polynomial with the use of GenPolynomialTokenizer- Specified by:
parsein interfaceElemFactory<C extends RingElem<C>>- Overrides:
parsein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
r- Reader.- Returns:
- next RecSolvablePolynomial from r.
-
univariate
Generate univariate solvable polynomial in a given variable.- Overrides:
univariatein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
i- the index of the variable.- Returns:
- X_i as solvable univariate polynomial.
-
univariate
Generate univariate solvable polynomial in a given variable with given exponent.- Overrides:
univariatein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
i- the index of the variable.e- the exponent of the variable.- Returns:
- X_i^e as solvable univariate polynomial.
-
univariate
Generate univariate solvable polynomial in a given variable with given exponent.- Overrides:
univariatein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<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.
-
univariateList
Generate list of univariate polynomials in all variables.- Overrides:
univariateListin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Returns:
- List(X_1,...,X_n) a list of univariate polynomials.
-
univariateList
Generate list of univariate polynomials in all variables.- Overrides:
univariateListin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
modv- number of module variables.- Returns:
- List(X_1,...,X_n) a list of univariate polynomials.
-
univariateList
Generate list of univariate polynomials in all variables with given exponent.- Overrides:
univariateListin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- 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
Extend variables. Used e.g. in module embedding. Extend number of variables by i.- Overrides:
extendin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
i- number of variables to extend.- Returns:
- extended solvable polynomial ring factory.
-
extend
Extend variables. Used e.g. in module embedding. Extend number of variables by i.- Overrides:
extendin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
i- number of variables to extend.top- true for TOP term order, false for POT term order.- Returns:
- extended solvable polynomial ring factory.
-
extend
Extend variables. Used e.g. in module embedding. Extend number of variables by length(vn). New variables commute with the exiting variables.- Overrides:
extendin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
vs- names for extended variables.- Returns:
- extended polynomial ring factory.
-
extend
Extend variables. Used e.g. in module embedding. Extend number of variables by length(vn). New variables commute with the exiting variables.- Overrides:
extendin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
vs- names for extended variables.top- true for TOP term order, false for POT term order.- Returns:
- extended polynomial ring factory.
-
contract
Contract variables. Used e.g. in module embedding. Contract number of variables by i.- Overrides:
contractin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
i- number of variables to remove.- Returns:
- contracted solvable polynomial ring factory.
-
reverse
Reverse variables. Used e.g. in opposite rings.- Overrides:
reversein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Returns:
- solvable polynomial ring factory with reversed variables.
-
reverse
Reverse variables. Used e.g. in opposite rings.- Overrides:
reversein classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
partial- true for partially reversed term orders.- Returns:
- solvable polynomial ring factory with reversed variables.
-
distribute
public static <C extends RingElem<C>> GenSolvablePolynomialRing<C> distribute(RecSolvablePolynomialRing<C> rf) Distributive representation as polynomial with all main variables.- Returns:
- distributive polynomial ring factory.
-
permutation
Permutation of polynomial ring variables.- Overrides:
permutationin classGenSolvablePolynomialRing<GenPolynomial<C extends RingElem<C>>>- Parameters:
P- permutation.- Returns:
- P(this).
-