Enum Class GenericInequalitySearch.Inequality
java.lang.Object
java.lang.Enum<GenericInequalitySearch.Inequality>
org.apache.datasketches.quantilescommon.GenericInequalitySearch.Inequality
- All Implemented Interfaces:
Serializable
,Comparable<GenericInequalitySearch.Inequality>
,Constable
- Enclosing class:
- GenericInequalitySearch
public static enum GenericInequalitySearch.Inequality
extends Enum<GenericInequalitySearch.Inequality>
The enumerator of inequalities
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionGiven a sorted array of increasing values arr[] and a key value V, this criterion instructs the binary search algorithm to find the adjacent pair of values {A,B} such that A ≤ V ≤ B.Given a sorted array of increasing values arr[] and a key value V, this criterion instructs the binary search algorithm to find the lowest adjacent pair of values {A,B} such that A < V ≤ B.
Let low = index of the lowest value in the range.
Let high = index of the highest value in the range.Given a sorted array of increasing values arr[] and a key value V, this criterion instructs the binary search algorithm to find the lowest adjacent pair of values {A,B} such that A ≤ V < B.
Let low = index of the lowest value in the range.
Let high = index of the highest value in the range.Given a sorted array of increasing values arr[] and a key value V, this criterion instructs the binary search algorithm to find the highest adjacent pair of values {A,B} such that A ≤ V < B.
Let low = index of the lowest value in the range.
Let high = index of the highest value in the range.Given a sorted array of increasing values arr[] and a key value v, this criterion instructs the binary search algorithm to find the highest adjacent pair of values {A,B} such that A < v ≤ B.
Let low = index of the lowest value in the range.
Let high = index of the highest value in the range. -
Method Summary
Modifier and TypeMethodDescriptionReturns the enum constant of this class with the specified name.static GenericInequalitySearch.Inequality[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
LT
Given a sorted array of increasing values arr[] and a key value v, this criterion instructs the binary search algorithm to find the highest adjacent pair of values {A,B} such that A < v ≤ B.
Let low = index of the lowest value in the range.
Let high = 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
Given a sorted array of increasing values arr[] and a key value V, this criterion instructs the binary search algorithm to find the highest adjacent pair of values {A,B} such that A ≤ V < B.
Let low = index of the lowest value in the range.
Let high = 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
Given a sorted array of increasing values arr[] and a key value V, this criterion instructs the binary search algorithm to find the adjacent pair of values {A,B} such that A ≤ V ≤ B. The returned value from the binary search algorithm will be the index of A or B, if one of them is equal to V, or -1 if V is not equal to either one. -
GE
Given a sorted array of increasing values arr[] and a key value V, this criterion instructs the binary search algorithm to find the lowest adjacent pair of values {A,B} such that A < V ≤ B.
Let low = index of the lowest value in the range.
Let high = 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
Given a sorted array of increasing values arr[] and a key value V, this criterion instructs the binary search algorithm to find the lowest adjacent pair of values {A,B} such that A ≤ V < B.
Let low = index of the lowest value in the range.
Let high = 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 Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-