|
Algorithm Development Kit 1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectalgs.model.kdtree.DimensionalComparator
public class DimensionalComparator
Able to compare IMultiPoint objects using a fixed dimensional index to select the value against which to compare.
Field Summary | |
---|---|
int |
d
The dimension against which the points are being compared. |
Constructor Summary | |
---|---|
DimensionalComparator(int d)
Construct with the given dimensional index (d >= 1). |
Method Summary | |
---|---|
int |
compare(IMultiPoint o1,
IMultiPoint o2)
Compare the two points against a given dimension. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
---|
equals |
Field Detail |
---|
public final int d
Constructor Detail |
---|
public DimensionalComparator(int d)
d
- specific dimension (d >= 1).Method Detail |
---|
public int compare(IMultiPoint o1, IMultiPoint o2)
Note that for performance reasons, there is no check to ensure that the two points have the same dimensionality. Indeed, if this method is invoked with an IMultiPoint whose dimensionality is less than d, then the result is undetermined (it may throw a runtime exception it may not).
compare
in interface java.util.Comparator<IMultiPoint>
o1
- first IMultiPoint to be compared againsto2
- second IMultiPoint to be compared against.
|
Algorithm Development Kit 1.0 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |