org.apache.datasketches.quantilescommon

## Enum QuantileSearchCriteria

- java.lang.Object
- - java.lang.Enum<QuantileSearchCriteria>
  - - org.apache.datasketches.quantilescommon.QuantileSearchCriteria

All Implemented Interfaces:
  Serializable, Comparable<QuantileSearchCriteria>

    public enum QuantileSearchCriteria
    extends Enum<QuantileSearchCriteria>

These search criteria are used by the KLL, REQ and Classic Quantiles sketches in the DataSketches library.

Author:
  Lee Rhodes
See Also:
  Sketching Quantiles and Ranks Tutorial

### Enum Constant Summary

Enum Constants
Enum Constant and Description
`EXCLUSIVE` Definition of EXCLUSIVE getQuantile(r) search: Given rank r, return the quantile of the smallest rank that is strictly greater than r.
`INCLUSIVE` Definition of INCLUSIVE getQuantile(r) search: Given rank r, return the quantile of the smallest rank that is strictly greater than or equal to r.

### Method Summary

All Methods Static Methods Concrete Methods
`static QuantileSearchCriteria` `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static QuantileSearchCriteria[]` `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

#### INCLUSIVE

    public static final QuantileSearchCriteria INCLUSIVE

Definition of INCLUSIVE getQuantile(r) search:
Given rank r, return the quantile of the smallest rank that is strictly greater than or equal to r.

Definition of INCLUSIVE getRank(q) search:
Given quantile q, return the rank, r, of the largest quantile that is less than or equal to q.

#### EXCLUSIVE

    public static final QuantileSearchCriteria EXCLUSIVE

Definition of EXCLUSIVE getQuantile(r) search:
Given rank r, return the quantile of the smallest rank that is strictly greater than r.

However, if the given rank is is equal to 1.0, or there is no quantile that satisfies this criterion the method will return a NaN or null.

Definition of EXCLUSIVE getRank(q) search:
Given quantile q, return the rank, r, of the largest quantile that is strictly less than q.

If there is no quantile value that is strictly less than q, the method will return a rank of zero.

### Method Detail

#### values

    public static QuantileSearchCriteria[] 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 (QuantileSearchCriteria c : QuantileSearchCriteria.values())
        System.out.println(c);

Returns:
  an array containing the constants of this enum type, in the order they are declared

#### valueOf

    public static QuantileSearchCriteria 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 name
  `NullPointerException` - if the argument is null