|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jaitools.numeric.RangeExtendedComparator<T>
T - the numeric typepublic class RangeExtendedComparator<T extends Number & Comparable>
A comparator for Range objects capable of discerning the 18 different possible
interval comparisons as described by:
Brian Hayes (2003) A lucid interval.Constants describing each of these possible comparisons are defined in the
American Scientist 91(6):484-488.Available at: http://www.cs.utep.edu/interval-comp/hayes.pdf
RangeComparator.Result class.
Normally, client code will not need to use the methods defined in this class
directly but will work through the Range class.
| Nested Class Summary | |
|---|---|
static class |
RangeExtendedComparator.Result
Constants defining the names, notation and descriptions for the 18 different possible interval comparisons as described by: Brian Hayes (2003) A lucid interval. |
| Field Summary | |
|---|---|
static int |
EQ
Constant for "equal to". |
static int |
GT
Constant for "greater than". |
static int |
LT
Constant for "less than". |
static int |
MAX_MAX
Index of RangeExtendedComparator.Result element for the comparison of the max value
of the first Range with the max value of the second range. |
static int |
MAX_MIN
Index of RangeExtendedComparator.Result element for the comparison of the max value
of the first Range with the min value of the second range. |
static int |
MIN_MAX
Index of RangeExtendedComparator.Result element for the comparison of the min value
of the first Range with the max value of the second range. |
static int |
MIN_MIN
Index of RangeExtendedComparator.Result element for the comparison of the min value
of the first Range with the min value of the second range. |
| Constructor Summary | |
|---|---|
RangeExtendedComparator()
|
|
| Method Summary | |
|---|---|
RangeExtendedComparator.Result |
compare(Range<T> r1,
Range<T> r2)
Compares two Range objects and return the RangeComparator.Result
that describes the relationship between them from the point of view of the first Range |
static boolean |
isIntersection(RangeExtendedComparator.Result r)
Tests if a Result value describes an intersection between two ranges. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int LT
public static final int EQ
public static final int GT
public static final int MIN_MAX
RangeExtendedComparator.Result element for the comparison of the min value
of the first Range with the max value of the second range.
public static final int MIN_MIN
RangeExtendedComparator.Result element for the comparison of the min value
of the first Range with the min value of the second range.
public static final int MAX_MAX
RangeExtendedComparator.Result element for the comparison of the max value
of the first Range with the max value of the second range.
public static final int MAX_MIN
RangeExtendedComparator.Result element for the comparison of the max value
of the first Range with the min value of the second range.
| Constructor Detail |
|---|
public RangeExtendedComparator()
| Method Detail |
|---|
public static boolean isIntersection(RangeExtendedComparator.Result r)
r - the Result value
public RangeExtendedComparator.Result compare(Range<T> r1,
Range<T> r2)
RangeComparator.Result
that describes the relationship between them from the point of view of the first Range
r1 - the first Ranger2 - the second Range
RangeComparator.Result constant
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||