Package com.google.common.math
Class Quantiles.ScaleAndIndex
- java.lang.Object
- 
- com.google.common.math.Quantiles.ScaleAndIndex
 
- 
- Enclosing class:
- Quantiles
 
 public static final class Quantiles.ScaleAndIndex extends Object Describes the point in a fluent API chain where the scale and a single quantile index (i.e. the q and the k in the kth q-quantile) have been specified.- Since:
- 20.0
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description doublecompute(double... dataset)Computes the quantile value of the given dataset.doublecompute(int... dataset)Computes the quantile value of the given dataset.doublecompute(long... dataset)Computes the quantile value of the given dataset.doublecompute(Collection<? extends Number> dataset)Computes the quantile value of the given dataset.doublecomputeInPlace(double... dataset)Computes the quantile value of the given dataset, performing the computation in-place.
 
- 
- 
- 
Method Detail- 
computepublic double compute(Collection<? extends Number> dataset) Computes the quantile value of the given dataset.- Parameters:
- dataset- the dataset to do the calculation on, which must be non-empty, which will be cast to doubles (with any associated lost of precision), and which will not be mutated by this call (it is copied instead)
- Returns:
- the quantile value
 
 - 
computepublic double compute(double... dataset) Computes the quantile value of the given dataset.- Parameters:
- dataset- the dataset to do the calculation on, which must be non-empty, which will not be mutated by this call (it is copied instead)
- Returns:
- the quantile value
 
 - 
computepublic double compute(long... dataset) Computes the quantile value of the given dataset.- Parameters:
- dataset- the dataset to do the calculation on, which must be non-empty, which will be cast to doubles (with any associated lost of precision), and which will not be mutated by this call (it is copied instead)
- Returns:
- the quantile value
 
 - 
computepublic double compute(int... dataset) Computes the quantile value of the given dataset.- Parameters:
- dataset- the dataset to do the calculation on, which must be non-empty, which will be cast to doubles, and which will not be mutated by this call (it is copied instead)
- Returns:
- the quantile value
 
 - 
computeInPlacepublic double computeInPlace(double... dataset) Computes the quantile value of the given dataset, performing the computation in-place.- Parameters:
- dataset- the dataset to do the calculation on, which must be non-empty, and which will be arbitrarily reordered by this method call
- Returns:
- the quantile value
 
 
- 
 
-