public class ShiftOrder extends Object implements LexicographicalOrder
| Constructor and Description |
|---|
ShiftOrder(int dimensions,
int mostSignificant)
It creates a lexicographical order with the possibility
to shift the order according to the most significant dimension.
|
| Modifier and Type | Method and Description |
|---|---|
String |
checkInvariants()
It checks that this order has consistent data structures.
|
int |
compare(int[] p1,
int[] p2)
It compares two k-dimensional points.
|
int |
dimensionAt(int precedenceLevel)
It provides the dimension corresponding to the given precedence level
|
int |
getMostSignificantDimension()
This is equivalent to the call precedenceOf(0).
|
int[] |
masterOrdering()
It returns the ordering of dimensions used when no shift is applied
(i.e.
|
int |
precedenceOf(int dimension)
It provides the precedence level of the given dimension.
|
void |
setMostSignificantDimension(int dimension)
It shifts the lexicographical order so that the most significant dimension
is set to d.
|
public ShiftOrder(int dimensions,
int mostSignificant)
dimensions - number of dimensions.mostSignificant - the position of the most significant dimension.public String checkInvariants()
public int compare(int[] p1,
int[] p2)
LexicographicalOrdercompare in interface LexicographicalOrderpublic int dimensionAt(int precedenceLevel)
LexicographicalOrderdimensionAt in interface LexicographicalOrderpublic int precedenceOf(int dimension)
LexicographicalOrderprecedenceOf in interface LexicographicalOrderpublic void setMostSignificantDimension(int dimension)
LexicographicalOrdersetMostSignificantDimension in interface LexicographicalOrderdimension - the dimension to be considered most significantpublic int getMostSignificantDimension()
LexicographicalOrdergetMostSignificantDimension in interface LexicographicalOrderpublic int[] masterOrdering()
LexicographicalOrdermasterOrdering in interface LexicographicalOrderCopyright © 2016. All rights reserved.