Package edu.jas.poly
Class RelationTable<C extends RingElem<C>>
java.lang.Object
edu.jas.poly.RelationTable<C>
- All Implemented Interfaces:
Serializable
RelationTable for solvable polynomials. This class maintains the
non-commutative multiplication relations of solvable polynomial rings. The
table entries are initialized with relations of the form xj *
xi = pij. During multiplication the relations are
updated by relations of the form xjk *
xil = pijkl. If no relation for
xj * xi is found in the table, this multiplication is
assumed to be commutative xi xj. Can also be used for
relations between coefficients and main variables.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal boolean
Usage indicator: table or coeffTable.private static final boolean
private static final org.apache.logging.log4j.Logger
final GenSolvablePolynomialRing
<C> The factory for the solvable polynomial ring.The data structure for the relations. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor for RelationTable requires ring factory.RelationTable
(GenSolvablePolynomialRing<C> r, boolean coeffTable) Constructor for RelationTable requires ring factory. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRelations
(List<GenPolynomial<C>> rel) Add list of polynomial triples as relations.void
Add list of polynomial triples as relations.void
contract
(RelationTable<C> tab) Contract variables.(package private) boolean
equalMaps
(Map<ExpVectorPair, GenPolynomial<C>> m1, Map<ExpVectorPair, GenPolynomial<C>> m2) Equals for special maps.boolean
RelationTable equals.void
extend
(RelationTable<C> tab) Extend variables.(package private) Map
<ExpVectorPair, GenPolynomial<C>> fromListDeg2
(List a) Convert mixed list to map for base relations.(package private) int
Hash code for base relations.int
hashCode()
Hash code for this relation table.boolean
isEmpty()
Test if the table is empty.Lookup RelationTable for existing relation.Construct a key for (e,f).void
recursive
(RelationTable tab) Recursive representation.Convert relation table to list of polynomial triples.void
reverse
(RelationTable<C> tab) Reverse variables and relations.int
size()
Size of the table.toScript()
Get a scripting compatible string representation.toString()
Get the String representation.Get the String representation.void
update
(ExpVector e, ExpVector f, GenPolynomial<C> p) Update or initialize RelationTable with new relation.void
update
(ExpVector e, ExpVector f, GenSolvablePolynomial<C> p) Update or initialize RelationTable with new relation.void
update
(GenPolynomial<C> E, GenPolynomial<C> F, GenPolynomial<C> p) Update or initialize RelationTable with new relation.void
update
(GenPolynomial<C> E, GenPolynomial<C> F, GenSolvablePolynomial<C> p) Update or initialize RelationTable with new relation.
-
Field Details
-
table
The data structure for the relations. -
ring
The factory for the solvable polynomial ring. -
coeffTable
public final boolean coeffTableUsage indicator: table or coeffTable. -
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug
-
-
Constructor Details
-
RelationTable
Constructor for RelationTable requires ring factory. Note: This constructor is called within the constructor of the ring factory, so methods of this class can only be used after the other constructor has terminated.- Parameters:
r
- solvable polynomial ring factory.
-
RelationTable
Constructor for RelationTable requires ring factory. Note: This constructor is called within the constructor of the ring factory, so methods of this class can only be used after the other constructor has terminated.- Parameters:
r
- solvable polynomial ring factory.coeffTable
- indicator for coeffTable.
-
-
Method Details
-
equals
RelationTable equals. Tests same keySets and base relations. -
fromListDeg2
Convert mixed list to map for base relations.- Parameters:
a
- mixed list
-
fromListDeg2HashCode
Hash code for base relations.- Parameters:
a
- mixed list
-
equalMaps
Equals for special maps.- Parameters:
m1
- first mapm2
- second map
-
hashCode
public int hashCode()Hash code for this relation table. -
isEmpty
public boolean isEmpty()Test if the table is empty.- Returns:
- true if the table is empty, else false.
-
toString
Get the String representation. -
toString
Get the String representation.- Parameters:
vars
- names for the variables.- See Also:
-
toScript
Get a scripting compatible string representation.- Returns:
- script compatible representation for this relation table.
-
update
Update or initialize RelationTable with new relation. relation is e * f = p.- Parameters:
e
- first term.f
- second term.p
- solvable product polynomial.
-
update
Update or initialize RelationTable with new relation. relation is e * f = p.- Parameters:
E
- first term polynomial.F
- second term polynomial.p
- solvable product polynomial.
-
update
Update or initialize RelationTable with new relation. relation is e * f = p.- Parameters:
E
- first term polynomial.F
- second term polynomial.p
- product polynomial.
-
update
Update or initialize RelationTable with new relation. relation is e * f = p.- Parameters:
e
- first term.f
- second term.p
- solvable product polynomial.
-
lookup
Lookup RelationTable for existing relation. Find p with e * f = p. If no relation for e * f is contained in the table then return the symmetric product p = 1 e f.- Parameters:
e
- first term.f
- second term.- Returns:
- t table relation container, contains e' and f' with e f = e' lt(p) f'.
-
makeKey
Construct a key for (e,f).- Parameters:
e
- first term.f
- second term.- Returns:
- k key for (e,f).
-
size
public int size()Size of the table.- Returns:
- n number of non-commutative relations.
-
extend
Extend variables. Used e.g. in module embedding. Extend all ExpVectors and polynomials of the given relation table by i elements and put the relations into this table, i.e. this should be empty.- Parameters:
tab
- a relation table to be extended and inserted into this.
-
contract
Contract variables. Used e.g. in module embedding. Contract all ExpVectors and polynomials of the given relation table by i elements and put the relations into this table, i.e. this should be empty.- Parameters:
tab
- a relation table to be contracted and inserted into this.
-
recursive
Recursive representation. Split all ExpVectors and polynomials of the given relation table to lower elements and upper elements and put the relations into this table or this as coefficient table, i.e. this should be empty.- Parameters:
tab
- a relation table to be contracted and inserted into this.
-
reverse
Reverse variables and relations. Used e.g. in opposite rings. Reverse all ExpVectors and polynomials of the given relation table and put the modified relations into this table, i.e. this should be empty.- Parameters:
tab
- a relation table to be reverted and inserted into this.
-
relationList
Convert relation table to list of polynomial triples.- Returns:
- rel = (e1,f1,p1, ...) where ei * fi = pi are solvable relations.
-
addSolvRelations
Add list of polynomial triples as relations.- Parameters:
rel
- = (e1,f1,p1, ...) where ei * fi = pi are solvable relations. Note: Only because of type erasure, equivalent to addRelations().
-
addRelations
Add list of polynomial triples as relations.- Parameters:
rel
- = (e1,f1,p1, ...) where ei * fi = pi are solvable relations.
-