edu.jas.poly
Class TermOrder
- java.lang.Object
-
- edu.jas.poly.TermOrder
-
- All Implemented Interfaces:
- java.io.Serializable
public final class TermOrder extends java.lang.Object implements java.io.SerializableTerm order class for ordered polynomials. Implements the most used term orders: graded, lexicographical, weight aray and block orders. For the definitions see for example the articles Kredel, "Admissible term orderings used in computer algebra systems" and Sit, "Some comments on term-ordering in Gröbner basis computations". Note: the naming is not quite easy to understand: in case of doubt use the term orders with "I" in the name, like IGRLEX (the default) or INVLEX. Not all algorithms may work with all term orders, so watch your step. This class does not jet implement orders by linear forms over Q[t]. Objects of this class are immutable.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classTermOrder.EVComparatorComparator for ExpVectors.
-
Field Summary
Fields Modifier and Type Field and Description static intDEFAULT_EVORDstatic intGRLEXstatic intIGRLEXstatic intINVLEXstatic intLEXstatic intREVILEXstatic intREVITDGstatic intREVLEXstatic intREVTDEG
-
Constructor Summary
Constructors Constructor and Description TermOrder()Constructor for default term order.TermOrder(int evord)Constructor for given term order.TermOrder(int r, int split)Constructor for default split order.TermOrder(int ev1, int ev2, int r, int split)Constructor for given split order.TermOrder(long[] w)Constructor for given exponent weights.TermOrder(long[][] w)Constructor for given exponent weights.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description TermOrdercontract(int k, int len)Contract variables.booleanequals(java.lang.Object B)Comparison with any other object.TermOrderextend(int r, int k)Extend variables.TermOrderextendLower(int r, int k)Extend lower variables.TermOrder.EVComparatorgetAscendComparator()Get the ascending order comparator.TermOrder.EVComparatorgetDescendComparator()Get the descending order comparator.intgetEvord()Get the first defined order indicator.intgetEvord2()Get the second defined order indicator.intgetSplit()Get the split index.TermOrder.EVComparatorgetSugarComparator()Get the sugar order comparator.long[][]getWeight()Get the weight array.inthashCode()Hash code.TermOrderreverse()Reverse variables.TermOrderreverse(boolean partial)Reverse variables.static intrevert(int evord)Revert exponent order.java.lang.StringtoString()String representation of TermOrder.java.lang.StringweightToString()String representation of weight vector.
-
-
-
Field Detail
-
LEX
public static final int LEX
- See Also:
- Constant Field Values
-
INVLEX
public static final int INVLEX
- See Also:
- Constant Field Values
-
GRLEX
public static final int GRLEX
- See Also:
- Constant Field Values
-
IGRLEX
public static final int IGRLEX
- See Also:
- Constant Field Values
-
REVLEX
public static final int REVLEX
- See Also:
- Constant Field Values
-
REVILEX
public static final int REVILEX
- See Also:
- Constant Field Values
-
REVTDEG
public static final int REVTDEG
- See Also:
- Constant Field Values
-
REVITDG
public static final int REVITDG
- See Also:
- Constant Field Values
-
DEFAULT_EVORD
public static final int DEFAULT_EVORD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TermOrder
public TermOrder()
Constructor for default term order.
-
TermOrder
public TermOrder(int evord)
Constructor for given term order.- Parameters:
evord- requested term order indicator / enumerator.
-
TermOrder
public TermOrder(long[] w)
Constructor for given exponent weights.- Parameters:
w- weight vector of longs.
-
TermOrder
public TermOrder(long[][] w)
Constructor for given exponent weights.- Parameters:
w- weight array of longs.
-
TermOrder
public TermOrder(int r, int split)Constructor for default split order.- Parameters:
r- max number of exponents to compare.split- index.
-
TermOrder
public TermOrder(int ev1, int ev2, int r, int split)Constructor for given split order.- Parameters:
ev1- requested term order indicator for first block.ev2- requested term order indicator for second block.r- max number of exponents to compare.split- index.
-
-
Method Detail
-
getEvord
public int getEvord()
Get the first defined order indicator.- Returns:
- evord.
-
getEvord2
public int getEvord2()
Get the second defined order indicator.- Returns:
- evord2.
-
getSplit
public int getSplit()
Get the split index.- Returns:
- split.
-
getWeight
public long[][] getWeight()
Get the weight array.- Returns:
- weight.
-
getDescendComparator
public TermOrder.EVComparator getDescendComparator()
Get the descending order comparator. Sorts the highest terms first.- Returns:
- horder.
-
getAscendComparator
public TermOrder.EVComparator getAscendComparator()
Get the ascending order comparator. Sorts the lowest terms first.- Returns:
- lorder.
-
getSugarComparator
public TermOrder.EVComparator getSugarComparator()
Get the sugar order comparator. Sorts the graded lowest terms first.- Returns:
- sugar.
-
equals
public boolean equals(java.lang.Object B)
Comparison with any other object.- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
hashCode
public int hashCode()
Hash code.- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
weightToString
public java.lang.String weightToString()
String representation of weight vector.- See Also:
Object.toString()
-
toString
public java.lang.String toString()
String representation of TermOrder.- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
extend
public TermOrder extend(int r, int k)
Extend variables. Used e.g. in module embedding. Extend TermOrder by k elements. Note: todo distinguish TOP and POT orders.- Parameters:
r- current number of variables.k- number of variables to extend.- Returns:
- extended TermOrder.
-
extendLower
public TermOrder extendLower(int r, int k)
Extend lower variables. Extend TermOrder by k elements. Note: todo distinguish TOP and POT orders.- Parameters:
r- current number of variables.k- number of variables to extend.- Returns:
- extended TermOrder.
-
contract
public TermOrder contract(int k, int len)
Contract variables. Used e.g. in module embedding. Contract TermOrder to non split status.- Parameters:
k- position of first element to be copied.len- new length.- Returns:
- contracted TermOrder.
-
reverse
public TermOrder reverse()
Reverse variables. Used e.g. in opposite rings.- Returns:
- TermOrder for reversed variables.
-
reverse
public TermOrder reverse(boolean partial)
Reverse variables. Used e.g. in opposite rings.- Parameters:
partial- true for partialy reversed term orders.- Returns:
- TermOrder for reversed variables.
-
revert
public static int revert(int evord)
Revert exponent order. Used e.g. in opposite rings.- Parameters:
evord- exponent order to be reverted.- Returns:
- reverted exponent order.
-
-
DMelt 3.0 © DataMelt by jWork.ORG