Package org.apache.datasketches
Enum GenericInequalitySearch.Inequality
- java.lang.Object
-
- java.lang.Enum<GenericInequalitySearch.Inequality>
-
- org.apache.datasketches.GenericInequalitySearch.Inequality
-
- All Implemented Interfaces:
Serializable,Comparable<GenericInequalitySearch.Inequality>
- Enclosing class:
- GenericInequalitySearch
public static enum GenericInequalitySearch.Inequality extends Enum<GenericInequalitySearch.Inequality>
The enumerator of inequalities
-
-
Enum Constant Summary
Enum Constants Enum Constant Description EQEquals: Although not an inequality, it is included for completeness.GEGreater-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.GTGreater-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.LELess-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.LTLess-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.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static GenericInequalitySearch.InequalityvalueOf(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.
-
-
-
Enum Constant Detail
-
LT
public static final GenericInequalitySearch.Inequality 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.If v > arr[high], return arr[high].
If v ≤ arr[low], return -1.
Else return index of A.
-
LE
public static final GenericInequalitySearch.Inequality 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.If v ≥ arr[high], return arr[high].
If v < arr[low], return -1.
Else return index of A.
-
EQ
public static final GenericInequalitySearch.Inequality EQ
Equals: Although not an inequality, it is included for completeness. An index ≥ 0 is returned unless not found, then -1 is returned.
-
GE
public static final GenericInequalitySearch.Inequality 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.If v ≤ arr[low], return arr[low].
If v > arr[high], return -1.
Else return index of B.
-
GT
public static final GenericInequalitySearch.Inequality 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.If v < arr[low], return arr[low].
If v ≥ arr[high], return -1.
Else return index of B.
-
-
Method Detail
-
values
public static GenericInequalitySearch.Inequality[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (GenericInequalitySearch.Inequality c : GenericInequalitySearch.Inequality.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static GenericInequalitySearch.Inequality valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
-