|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<RangeExtendedComparator.Result>
org.jaitools.numeric.RangeExtendedComparator.Result
public static enum 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.The meaning of each of the four characters in the notation describing the comparison between interval X and interval Y is as follows:
American Scientist 91(6):484-488.Available at: http://www.cs.utep.edu/interval-comp/hayes.pdf
X <<=> Y means interval X starts below and extends to
the maximum of interval Y.
| Enum Constant Summary | |
|---|---|
EEEE
(Hayes notation ====) Point X is exactly equal to point Y. |
|
EEGG
(Hayes notation ==>>) Interval X extends from point location Y. |
|
EGEG
(Hayes notation =>=>) X is a point at maximum of interval Y |
|
EGGG
(Hayes notation =>>>) Interval X extends from maximum of interval Y |
|
GGGG
(Hayes notation >>>>) Interval X is entirely greater than interval Y |
|
LEEG
(Hayes notation <==>) Interval X is exactly equal to finite interval Y. |
|
LEGG
(Hayes notation <=>>) Interval X starts with and extends beyond interval Y. |
|
LELE
(Hayes notation <=<=) X is a point at minimum of interval Y |
|
LELG
(Hayes notation <=<>) Interval X starts with and ends within interval Y |
|
LGEG
(Hayes notation <>=>) Interval X starts within and extends to maximum of interval Y |
|
LGGG
(Hayes notation <>>>) Interval X starts within and extends beyond interval Y |
|
LGLG
(Hayes notation <><>) Interval X is enclosed by interval Y |
|
LLEE
(Hayes notation <<==) Interval X starts below and has maximum at point location Y. |
|
LLEG
(Hayes notation <<=>) Interval X starts below and extends to maximum of interval Y
Notation: <<=> |
|
LLGG
(Hayes notation <<>>) Interval X strictly encloses interval Y |
|
LLLE
(Hayes notation <<<=) Interval X extends to minimum of interval Y |
|
LLLG
(Hayes notation <<<>) Interval X starts below and extends within interval Y |
|
LLLL
(Hayes notation <<<<) Interval X is entirely less than interval Y |
|
| Method Summary | |
|---|---|
static RangeExtendedComparator.Result |
get(int[] compFlags)
Get the Result that matches the given array of comparison flags. |
int |
getAt(int pos)
Gets the result element at the given index. |
String |
getDesc()
Returns a description for this comparison type. |
String |
getNotation()
Gets the notation form of this comparison. |
List<RangeExtendedComparator.Result> |
match(int op,
int pos)
Partial matching: returns a List of Types that have the given end-point comparison flag at the specified position |
List<RangeExtendedComparator.Result> |
match(int op,
int pos,
Collection<RangeExtendedComparator.Result> typesToSearch)
Partial matching: returns a List of those Types in the provided Collection that have the given end-point comparison flag at the specified position. |
static RangeExtendedComparator.Result |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static RangeExtendedComparator.Result[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final RangeExtendedComparator.Result LLLL
<<<<) Interval X is entirely less than interval Y
public static final RangeExtendedComparator.Result LLLE
<<<=) Interval X extends to minimum of interval Y
public static final RangeExtendedComparator.Result LLLG
<<<>) Interval X starts below and extends within interval Y
public static final RangeExtendedComparator.Result LLEG
<<=>) Interval X starts below and extends to maximum of interval Y
Notation: <<=>
public static final RangeExtendedComparator.Result LEGG
<=>>) Interval X starts with and extends beyond interval Y.
public static final RangeExtendedComparator.Result LLEE
<<==) Interval X starts below and has maximum at point location Y.
public static final RangeExtendedComparator.Result EEGG
==>>) Interval X extends from point location Y.
public static final RangeExtendedComparator.Result LEEG
<==>) Interval X is exactly equal to finite interval Y.
public static final RangeExtendedComparator.Result EEEE
====) Point X is exactly equal to point Y. ====
public static final RangeExtendedComparator.Result LLGG
<<>>) Interval X strictly encloses interval Y
public static final RangeExtendedComparator.Result LGLG
<><>) Interval X is enclosed by interval Y
public static final RangeExtendedComparator.Result LGGG
<>>>) Interval X starts within and extends beyond interval Y
public static final RangeExtendedComparator.Result LGEG
<>=>) Interval X starts within and extends to maximum of interval Y
public static final RangeExtendedComparator.Result LELG
<=<>) Interval X starts with and ends within interval Y
public static final RangeExtendedComparator.Result EGEG
=>=>) X is a point at maximum of interval Y
public static final RangeExtendedComparator.Result LELE
<=<=) X is a point at minimum of interval Y
public static final RangeExtendedComparator.Result EGGG
=>>>) Interval X extends from maximum of interval Y
public static final RangeExtendedComparator.Result GGGG
>>>>) Interval X is entirely greater than interval Y
| Method Detail |
|---|
public static RangeExtendedComparator.Result[] values()
for (RangeExtendedComparator.Result c : RangeExtendedComparator.Result.values()) System.out.println(c);
public static RangeExtendedComparator.Result valueOf(String name)
name - the name of the enum constant to be returned.
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is nullpublic String getNotation()
public String getDesc()
Range<Integer> r1 = ...
Range<Integer> r2 = ...
RangeComparator.Result comp = r1.compareTo(r2);
System.out.println(String.format("Range r1 %s Range r2", comp.getDesc()));
public int getAt(int pos)
RangeComparator#MAX_MAX,
RangeComparator#MAX_MIN,
RangeComparator#MIN_MAX,
RangeComparator#MIN_MIN.
pos - index of the element to retrieve
RangeComparator#LT, RangeComparator#GT,
or RangeComparator#EQ
public List<RangeExtendedComparator.Result> match(int op,
int pos)
op - one of the RangeComparator constants: LT, EQ, GTpos - flag position 0-3
match(int, int, java.util.Collection)
public List<RangeExtendedComparator.Result> match(int op,
int pos,
Collection<RangeExtendedComparator.Result> typesToSearch)
// first call uses two-arg method to select from all Types that have
// the given flag at pos 0 (Types with names L***)
List<Result> types = match(RangeComparator.LT, 0);
// now winnow down to those Types that match LL*G
types = match(RangeComparator.LT, 1, types);
types = match(RangeComparator.GT, 3, types);
for (Result t : types) {
System.out.println(t.toString() + ": " + t.getDesc());
}
op - one of the RangeComparator constants: LT, EQ, GTpos - flag position 0-3typesToSearch -
public static RangeExtendedComparator.Result get(int[] compFlags)
compFlags -
null if there is no match
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||