# Enum Class QuantileSearchCriteria

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

All Implemented Interfaces:
  `Serializable, Comparable<QuantileSearchCriteria>, Constable`

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

## Nested Class Summary

### Nested classes/interfaces inherited from class Enum

`Enum.EnumDesc<E>`

## Enum Constant Summary

Enum Constants
Enum Constant
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

Modifier and Type
Method
Description
`static QuantileSearchCriteria`
`valueOf(String name)`
Returns the enum constant of this class with the specified name.
`static QuantileSearchCriteria[]`
`values()`
Returns an array containing the constants of this enum class, in the order they are declared.

### Methods inherited from class Enum

`compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

### Methods inherited from class Object

`getClass, notify, notifyAll, wait, wait, wait`

## Enum Constant Details

### 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 Details

### values

public static QuantileSearchCriteria[] 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

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