Class GrlexComparator
java.lang.Object
com.singularsys.extensions.polynomials.comparators.LexComparator
com.singularsys.extensions.polynomials.comparators.GrlexComparator
- All Implemented Interfaces:
Comparator<PNodeI>
Graded Lexical Order comparator.
First orders by the total degree, then by degree of leftmost entry.
hence quadratic monomials in 3 variables are ordered as
"x^2", // (2,0,0) "x y", // (1,1,0) "x z", // (1,0,1) "y^2", // (0,2,0) "y z", // (0,1,1) "z^2", // (0,0,2) "x", // (1,0,0) "y", // (0,1,0) "z", // (0,0,1)With higher degree terms first, then those with the higher power of x first, then with highest power of y. Bracket are (deg x, deg y, deg z).
Note that variables are ordered in reverse alphabetical order so x > y > z.
See Cox, Little and O'Shea, Ideals, Varieties and Algorithms, pp57-58
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.singularsys.extensions.polynomials.comparators.LexComparator
compare, compare, compare, compare, compare, compare, compare, compare, getPositionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
GrlexComparator
Constructor. To set up usePolynomialCreator pc = new PolynomialCreator(); Comparator<PNodeI> lex = new GrlexComparator(pc); pc.setComparator(lex);- Parameters:
pc-
-
GrlexComparator
-
-
Method Details
-
compare
- Overrides:
comparein classLexComparator
-
compare
- Overrides:
comparein classLexComparator
-
compare
- Overrides:
comparein classLexComparator
-