Package com.google.common.math
Class Quantiles.ScaleAndIndexes
java.lang.Object
com.google.common.math.Quantiles.ScaleAndIndexes
- Enclosing class:
Quantiles
Describes the point in a fluent API chain where the scale and a multiple quantile indexes (i.e.
the q and a set of values for the k in the kth q-quantile) have been specified.
-
Method Summary
Modifier and TypeMethodDescriptioncompute
(double... dataset) Computes the quantile values of the given dataset.compute
(int... dataset) Computes the quantile values of the given dataset.compute
(long... dataset) Computes the quantile values of the given dataset.compute
(Collection<? extends Number> dataset) Computes the quantile values of the given dataset.computeInPlace
(double... dataset) Computes the quantile values of the given dataset, performing the computation in-place.
-
Method Details
-
compute
Computes the quantile values 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:
- an unmodifiable map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values
-
compute
Computes the quantile values 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:
- an unmodifiable map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values
-
compute
Computes the quantile values 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:
- an unmodifiable map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values
-
compute
Computes the quantile values 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:
- an unmodifiable map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values
-
computeInPlace
Computes the quantile values 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:
- an unmodifiable map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values
-