public static enum GenericInequalitySearch.Inequality extends Enum<GenericInequalitySearch.Inequality>
| Enum Constant and Description |
|---|
EQ
Equals: Although not an inequality, it is included for completeness.
|
GE
Greater-Than Or Equals: Find the lowest ranked adjacent pair {A, B} such that:
arr[A] < v ≤ arr[B]. Let low = lowest index of the lowest value in the range. Let high = highest index of the highest value in the range. |
GT
Greater-Than: Find the lowest ranked adjacent pair {A, B} such that:
arr[A] ≤ v < arr[B]. Let low = lowest index of the lowest value in the range. Let high = highest index of the highest value in the range. |
LE
Less-Than Or Equals: Find the highest ranked adjacent ordered pair {A, B} such that:
arr[A] ≤ v < arr[B]. Let low = lowest index of the lowest value in the range. Let high = highest index of the highest value in the range. |
LT
Less-Than: Find the highest ranked adjacent ordered pair {A, B} such that:
arr[A] < v ≤ arr[B] within the given range. Let low = lowest index of the lowest value in the range. Let high = highest index of the highest value in the range. |
| Modifier and Type | Method and Description |
|---|---|
static GenericInequalitySearch.Inequality |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static GenericInequalitySearch.Inequality[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final GenericInequalitySearch.Inequality LT
If v > arr[high], return arr[high].
If v ≤ arr[low], return -1.
Else return index of A.
public static final GenericInequalitySearch.Inequality LE
If v ≥ arr[high], return arr[high].
If v < arr[low], return -1.
Else return index of A.
public static final GenericInequalitySearch.Inequality EQ
public static final GenericInequalitySearch.Inequality GE
If v ≤ arr[low], return arr[low].
If v > arr[high], return -1.
Else return index of B.
public static final GenericInequalitySearch.Inequality GT
If v < arr[low], return arr[low].
If v ≥ arr[high], return -1.
Else return index of B.
public static GenericInequalitySearch.Inequality[] values()
for (GenericInequalitySearch.Inequality c : GenericInequalitySearch.Inequality.values()) System.out.println(c);
public static GenericInequalitySearch.Inequality valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullCopyright © 2015–2020 The Apache Software Foundation. All rights reserved.