Package edu.jas.application
Class ResidueSolvablePolynomialRing<C extends GcdRingElem<C>>
java.lang.Object
edu.jas.poly.GenPolynomialRing<SolvableResidue<C>>
edu.jas.poly.GenSolvablePolynomialRing<SolvableResidue<C>>
edu.jas.application.ResidueSolvablePolynomialRing<C>
- Type Parameters:
C
- coefficient type.
- All Implemented Interfaces:
AbelianGroupFactory<GenPolynomial<SolvableResidue<C>>>
,ElemFactory<GenPolynomial<SolvableResidue<C>>>
,MonoidFactory<GenPolynomial<SolvableResidue<C>>>
,RingFactory<GenPolynomial<SolvableResidue<C>>>
,Serializable
,Iterable<GenPolynomial<SolvableResidue<C>>>
public class ResidueSolvablePolynomialRing<C extends GcdRingElem<C>>
extends GenSolvablePolynomialRing<SolvableResidue<C>>
ResidueSolvablePolynomialRing generic solvable polynomial with residue
coefficients factory implementing RingFactory and extending
GenSolvablePolynomialRing factory. Factory for n-variate ordered solvable
polynomials over solvable residue 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.
Will eventually be deprecated use QLRSolvablePolynomialRing.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final boolean
private static final org.apache.logging.log4j.Logger
final ResidueSolvablePolynomial
<C> The constant polynomial 1 for this ring.final RecSolvablePolynomialRing
<C> Recursive solvable polynomial ring with polynomial coefficients.final ResidueSolvablePolynomial
<C> The constant polynomial 0 for this ring.Fields inherited from class edu.jas.poly.GenSolvablePolynomialRing
table
-
Constructor Summary
ConstructorsConstructorDescriptionResidueSolvablePolynomialRing
(RingFactory<SolvableResidue<C>> cf, int n) The constructor creates a solvable polynomial factory object with the default term order and commutative relations.ResidueSolvablePolynomialRing
(RingFactory<SolvableResidue<C>> cf, int n, RelationTable<SolvableResidue<C>> rt) The constructor creates a solvable polynomial factory object with the default term order.ResidueSolvablePolynomialRing
(RingFactory<SolvableResidue<C>> cf, int n, TermOrder t) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.ResidueSolvablePolynomialRing
(RingFactory<SolvableResidue<C>> cf, int n, TermOrder t, RelationTable<SolvableResidue<C>> rt) The constructor creates a solvable polynomial factory object with the given term order.ResidueSolvablePolynomialRing
(RingFactory<SolvableResidue<C>> cf, int n, TermOrder t, String[] v) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.ResidueSolvablePolynomialRing
(RingFactory<SolvableResidue<C>> cf, int n, TermOrder t, String[] v, RelationTable<SolvableResidue<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.ResidueSolvablePolynomialRing
(RingFactory<SolvableResidue<C>> cf, TermOrder t, String[] v) The constructor creates a solvable polynomial factory object with the given term order and commutative relations.The constructor creates a solvable polynomial factory object with the default term order. -
Method Summary
Modifier and TypeMethodDescriptioncontract
(int i) Contract variables.Copy polynomial c.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) ResidueSolvablePolynomial<C> element from a long value.Get a (constant) ResidueSolvablePolynomial<C> element from a BigInteger value.Solvable residue coefficients from integral polynomial coefficients.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 GenPolynomialTokenizerrandom
(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.Integral function from solvable residue coefficients.Integral function from solvable residue coefficients.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.Methods inherited from class edu.jas.poly.GenSolvablePolynomialRing
addRelations, addRelations, addSolvRelations, copy, distribute, permutation, recursive, valueOf, valueOf, valueOf
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
-
polCoeff
Recursive solvable polynomial ring with polynomial 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 -
debug
private static final boolean debug
-
-
Constructor Details
-
ResidueSolvablePolynomialRing
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.
-
ResidueSolvablePolynomialRing
public ResidueSolvablePolynomialRing(RingFactory<SolvableResidue<C>> cf, int n, RelationTable<SolvableResidue<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.
-
ResidueSolvablePolynomialRing
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.
-
ResidueSolvablePolynomialRing
public ResidueSolvablePolynomialRing(RingFactory<SolvableResidue<C>> cf, int n, TermOrder t, RelationTable<SolvableResidue<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.
-
ResidueSolvablePolynomialRing
public ResidueSolvablePolynomialRing(RingFactory<SolvableResidue<C>> cf, int n, TermOrder t, 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.
-
ResidueSolvablePolynomialRing
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.
-
ResidueSolvablePolynomialRing
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.
-
ResidueSolvablePolynomialRing
public ResidueSolvablePolynomialRing(RingFactory<SolvableResidue<C>> cf, int n, TermOrder t, String[] v, RelationTable<SolvableResidue<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.
-
ResidueSolvablePolynomialRing
public ResidueSolvablePolynomialRing(RingFactory<SolvableResidue<C>> cf, ResidueSolvablePolynomialRing 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 Details
-
toString
Get the String representation.- Overrides:
toString
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- See Also:
-
toScript
Get a scripting compatible string representation.- Specified by:
toScript
in interfaceElemFactory<C extends GcdRingElem<C>>
- Overrides:
toScript
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Returns:
- script compatible representation for this Element.
- See Also:
-
equals
Comparison with any other object.- Overrides:
equals
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- See Also:
-
hashCode
public int hashCode()Hash code for this polynomial ring.- Overrides:
hashCode
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- See Also:
-
getZERO
Get the zero element.- Specified by:
getZERO
in interfaceAbelianGroupFactory<C extends GcdRingElem<C>>
- Overrides:
getZERO
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Returns:
- 0 as ResidueSolvablePolynomial
.
-
getONE
Get the one element.- Specified by:
getONE
in interfaceMonoidFactory<C extends GcdRingElem<C>>
- Overrides:
getONE
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Returns:
- 1 as ResidueSolvablePolynomial
.
-
isCommutative
public boolean isCommutative()Query if this ring is commutative.- Specified by:
isCommutative
in interfaceMonoidFactory<C extends GcdRingElem<C>>
- Overrides:
isCommutative
in classGenSolvablePolynomialRing<SolvableResidue<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:
isAssociative
in interfaceMonoidFactory<C extends GcdRingElem<C>>
- Overrides:
isAssociative
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Returns:
- true, if this ring is associative, else false.
-
fromInteger
Get a (constant) ResidueSolvablePolynomial<C> element from a long value.- Specified by:
fromInteger
in interfaceElemFactory<C extends GcdRingElem<C>>
- Overrides:
fromInteger
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Parameters:
a
- long.- Returns:
- a ResidueSolvablePolynomial<C>.
-
fromInteger
Get a (constant) ResidueSolvablePolynomial<C> element from a BigInteger value.- Specified by:
fromInteger
in interfaceElemFactory<C extends GcdRingElem<C>>
- Overrides:
fromInteger
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Parameters:
a
- BigInteger.- Returns:
- a ResidueSolvablePolynomial<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 GcdRingElem<C>>
- Overrides:
random
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<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 GcdRingElem<C>>
- Overrides:
random
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<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 classGenSolvablePolynomialRing<SolvableResidue<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
Random solvable polynomial.- Overrides:
random
in classGenSolvablePolynomialRing<SolvableResidue<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
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 GcdRingElem<C>>
- Overrides:
parse
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Parameters:
s
- String.- Returns:
- ResidueSolvablePolynomial from s.
-
parse
Parse a solvable polynomial with the use of GenPolynomialTokenizer- Specified by:
parse
in interfaceElemFactory<C extends GcdRingElem<C>>
- Overrides:
parse
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Parameters:
r
- Reader.- Returns:
- next ResidueSolvablePolynomial from r.
-
univariate
Generate univariate solvable polynomial in a given variable.- Overrides:
univariate
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<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 classGenSolvablePolynomialRing<SolvableResidue<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
Generate univariate solvable polynomial in a given variable with given exponent.- Overrides:
univariate
in classGenSolvablePolynomialRing<SolvableResidue<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.
-
univariateList
Generate list of univariate polynomials in all variables.- Overrides:
univariateList
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Returns:
- List(X_1,...,X_n) a list of univariate polynomials.
-
univariateList
Generate list of univariate polynomials in all variables.- Overrides:
univariateList
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<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 classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<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:
extend
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<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:
extend
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<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 i.- Overrides:
extend
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Parameters:
vn
- names for extended variables.- Returns:
- extended solvable polynomial ring factory.
-
extend
Extend variables. Used e.g. in module embedding. Extend number of variables by i.- Overrides:
extend
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Parameters:
vn
- names for extended variables.top
- true for TOP term order, false for POT term order.- Returns:
- extended solvable polynomial ring factory.
-
contract
Contract variables. Used e.g. in module embedding. Contract number of variables by i.- Overrides:
contract
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<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 classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Returns:
- solvable polynomial ring factory with reversed variables.
-
reverse
Reverse variables. Used e.g. in opposite rings.- Overrides:
reverse
in classGenSolvablePolynomialRing<SolvableResidue<C extends GcdRingElem<C>>>
- Parameters:
partial
- true for partially reversed term orders.- Returns:
- solvable polynomial ring factory with reversed variables.
-
fromPolyCoefficients
Solvable residue coefficients from integral polynomial coefficients. Represent as polynomial with type SolvableResiduecoefficients. - Parameters:
A
- polynomial with integral polynomial coefficients to be converted.- Returns:
- polynomial with type SolvableResidue
coefficients.
-
toPolyCoefficients
Integral function from solvable residue coefficients. Represent as polynomial with type GenSolvablePolynomialcoefficients. - Parameters:
A
- polynomial with solvable residue coefficients to be converted.- Returns:
- polynomial with type GenSolvablePolynomial
coefficients.
-
toPolyCoefficients
Integral function from solvable residue coefficients. Represent as polynomial with type GenSolvablePolynomialcoefficients. - Parameters:
A
- polynomial with solvable residue coefficients to be converted.- Returns:
- polynomial with type GenSolvablePolynomial
coefficients.
-