Package edu.jas.poly
Class GenSolvablePolynomialRing<C extends RingElem<C>>
java.lang.Object
edu.jas.poly.GenPolynomialRing<C>
edu.jas.poly.GenSolvablePolynomialRing<C>
- Type Parameters:
C
- coefficient type.
- All Implemented Interfaces:
AbelianGroupFactory<GenPolynomial<C>>
,ElemFactory<GenPolynomial<C>>
,MonoidFactory<GenPolynomial<C>>
,RingFactory<GenPolynomial<C>>
,Serializable
,Iterable<GenPolynomial<C>>
- Direct Known Subclasses:
LocalSolvablePolynomialRing
,QLRSolvablePolynomialRing
,QuotSolvablePolynomialRing
,RecSolvablePolynomialRing
,RecSolvableWordPolynomialRing
,ResidueSolvablePolynomialRing
,ResidueSolvableWordPolynomialRing
GenSolvablePolynomialRing generic solvable polynomial factory implementing
RingFactory and extending GenPolynomialRing factory. Factory for n-variate
ordered solvable polynomials over C. The non-commutative multiplication
relations are maintained in a relation table. Almost immutable object, except
variable names and relation table contents.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.apache.logging.log4j.Logger
The constant polynomial 1 for this ring.final RelationTable
<C> The solvable multiplication relations.The constant polynomial 0 for this ring. -
Constructor Summary
ConstructorsConstructorDescriptionGenSolvablePolynomialRing
(RingFactory<C> cf, int n) The constructor creates a solvable polynomial factory object with the default term order and commutative relations.GenSolvablePolynomialRing
(RingFactory<C> cf, int n, RelationTable<C> rt) The constructor creates a solvable polynomial factory object with the default term order.GenSolvablePolynomialRing
(RingFactory<C> cf, int n, TermOrder t) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.GenSolvablePolynomialRing
(RingFactory<C> cf, int n, TermOrder t, RelationTable<C> rt) The constructor creates a solvable polynomial factory object with the given term order.GenSolvablePolynomialRing
(RingFactory<C> cf, int n, TermOrder t, String[] v) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.GenSolvablePolynomialRing
(RingFactory<C> cf, int n, TermOrder t, String[] v, RelationTable<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.GenSolvablePolynomialRing
(RingFactory<C> cf, TermOrder t, String[] v) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.GenSolvablePolynomialRing
(RingFactory<C> cf, String[] v) The constructor creates a solvable polynomial factory object with the default term order. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Generate the relation table of the solvable polynomial ring from a relation generator.void
addRelations
(List<GenPolynomial<C>> rel) Generate the relation table of the solvable polynomial ring from a polynomial list of relations.void
Generate the relation table of the solvable polynomial ring from a solvable polynomial list of relations.contract
(int i) Contract variables.Copy polynomial c.Distributive representation as polynomial with all main variables.boolean
Comparison 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) GenSolvablePolynomial<C> element from a long value.Get a (constant) GenSolvablePolynomial<C> element from a BigInteger value.getONE()
Get the one element.getZERO()
Get the zero element.int
hashCode()
Hash code for this polynomial ring.boolean
Query if this ring is associative.boolean
Query 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.recursive
(int i) Recursive representation as polynomial ring with i main variables.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.List
<? extends GenSolvablePolynomial<C>> Generate list of univariate polynomials in all variables.List
<? extends GenSolvablePolynomial<C>> univariateList
(int modv) Generate list of univariate polynomials in all variables.List
<? extends GenSolvablePolynomial<C>> univariateList
(int modv, long e) Generate list of univariate polynomials in all variables with given exponent.Get a (constant) GenPolynomial<C> element from a coefficient value.Get a GenPolynomial<C> element from a coefficient and an exponent vector.Get a GenPolynomial<C> element from an exponent vector.Methods inherited from class edu.jas.poly.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, varsToString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface edu.jas.structure.ElemFactory
valueOf
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
table
The solvable multiplication relations. -
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
-
GenSolvablePolynomialRing
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.
-
GenSolvablePolynomialRing
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.
-
GenSolvablePolynomialRing
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.
-
GenSolvablePolynomialRing
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.
-
GenSolvablePolynomialRing
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.
-
GenSolvablePolynomialRing
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.
-
GenSolvablePolynomialRing
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.
-
GenSolvablePolynomialRing
public GenSolvablePolynomialRing(RingFactory<C> cf, int n, TermOrder t, String[] v, RelationTable<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.
-
GenSolvablePolynomialRing
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
-
addRelations
Generate the relation table of the solvable polynomial ring from a relation generator.- Parameters:
rg
- relation generator.
-
addRelations
Generate the 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.
-
addSolvRelations
Generate the 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:
toString
in classGenPolynomialRing<C extends RingElem<C>>
- See Also:
-
toScript
Get a scripting compatible string representation.- Specified by:
toScript
in interfaceElemFactory<C extends RingElem<C>>
- Overrides:
toScript
in classGenPolynomialRing<C extends RingElem<C>>
- Returns:
- script compatible representation for this Element.
- See Also:
-
equals
Comparison with any other object.- Overrides:
equals
in classGenPolynomialRing<C extends RingElem<C>>
- See Also:
-
hashCode
public int hashCode()Hash code for this polynomial ring.- Overrides:
hashCode
in classGenPolynomialRing<C extends RingElem<C>>
- See Also:
-
getZERO
Get the zero element.- Specified by:
getZERO
in interfaceAbelianGroupFactory<C extends RingElem<C>>
- Overrides:
getZERO
in classGenPolynomialRing<C extends RingElem<C>>
- Returns:
- 0 as GenSolvablePolynomial
.
-
getONE
Get the one element.- Specified by:
getONE
in interfaceMonoidFactory<C extends RingElem<C>>
- Overrides:
getONE
in classGenPolynomialRing<C extends RingElem<C>>
- Returns:
- 1 as GenSolvablePolynomial
.
-
isCommutative
public boolean isCommutative()Query if this ring is commutative.- Specified by:
isCommutative
in interfaceMonoidFactory<C extends RingElem<C>>
- Overrides:
isCommutative
in classGenPolynomialRing<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 define an associative solvable ring.- Specified by:
isAssociative
in interfaceMonoidFactory<C extends RingElem<C>>
- Overrides:
isAssociative
in classGenPolynomialRing<C extends RingElem<C>>
- Returns:
- true, if this ring is associative, else false.
-
valueOf
Get a (constant) GenPolynomial<C> element from a coefficient value.- Overrides:
valueOf
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
a
- coefficient.- Returns:
- a GenPolynomial<C>.
-
valueOf
Get a GenPolynomial<C> element from an exponent vector.- Overrides:
valueOf
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
e
- exponent vector.- Returns:
- a GenPolynomial<C>.
-
valueOf
Get a GenPolynomial<C> element from a coefficient and an exponent vector.- Overrides:
valueOf
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
a
- coefficient.e
- exponent vector.- Returns:
- a GenPolynomial<C>.
-
fromInteger
Get a (constant) GenSolvablePolynomial<C> element from a long value.- Specified by:
fromInteger
in interfaceElemFactory<C extends RingElem<C>>
- Overrides:
fromInteger
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
a
- long.- Returns:
- a GenSolvablePolynomial<C>.
-
fromInteger
Get a (constant) GenSolvablePolynomial<C> element from a BigInteger value.- Specified by:
fromInteger
in interfaceElemFactory<C extends RingElem<C>>
- Overrides:
fromInteger
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
a
- BigInteger.- Returns:
- a GenSolvablePolynomial<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:
random
in interfaceElemFactory<C extends RingElem<C>>
- Overrides:
random
in classGenPolynomialRing<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:
random
in interfaceElemFactory<C extends RingElem<C>>
- Overrides:
random
in classGenPolynomialRing<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:
random
in classGenPolynomialRing<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:
random
in classGenPolynomialRing<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:
parse
in interfaceElemFactory<C extends RingElem<C>>
- Overrides:
parse
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
s
- String.- Returns:
- GenSolvablePolynomial from s.
-
parse
Parse a solvable polynomial with the use of GenPolynomialTokenizer- Specified by:
parse
in interfaceElemFactory<C extends RingElem<C>>
- Overrides:
parse
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
r
- Reader.- Returns:
- next GenSolvablePolynomial from r.
-
univariate
Generate univariate solvable polynomial in a given variable.- Overrides:
univariate
in classGenPolynomialRing<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:
univariate
in classGenPolynomialRing<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:
univariate
in classGenPolynomialRing<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:
univariateList
in classGenPolynomialRing<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:
univariateList
in classGenPolynomialRing<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:
univariateList
in classGenPolynomialRing<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. New variables commute with the exiting variables.- Overrides:
extend
in classGenPolynomialRing<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. New variables commute with the exiting variables.- Overrides:
extend
in classGenPolynomialRing<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:
extend
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
vn
- 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:
extend
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
vn
- 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:
contract
in classGenPolynomialRing<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:
reverse
in classGenPolynomialRing<C extends RingElem<C>>
- Returns:
- solvable polynomial ring factory with reversed variables.
-
reverse
Reverse variables. Used e.g. in opposite rings.- Overrides:
reverse
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
partial
- true for partially reversed term orders.- Returns:
- solvable polynomial ring factory with reversed variables.
-
recursive
Recursive representation as polynomial ring with i main variables.- Overrides:
recursive
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
i
- number of main variables.- Returns:
- recursive polynomial ring factory.
-
distribute
Distributive representation as polynomial with all main variables.- Overrides:
distribute
in classGenPolynomialRing<C extends RingElem<C>>
- Returns:
- distributive polynomial ring factory.
-
permutation
Permutation of polynomial ring variables.- Overrides:
permutation
in classGenPolynomialRing<C extends RingElem<C>>
- Parameters:
P
- permutation, must be compatible with the commutator relations.- Returns:
- P(this).
-