Class Quantiles.ScaleAndIndexes

  • Enclosing class:
    Quantiles

    public static final class Quantiles.ScaleAndIndexes
    extends java.lang.Object
    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.
    Since:
    20.0
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.Integer,​java.lang.Double> compute​(double... dataset)
      Computes the quantile values of the given dataset.
      java.util.Map<java.lang.Integer,​java.lang.Double> compute​(int... dataset)
      Computes the quantile values of the given dataset.
      java.util.Map<java.lang.Integer,​java.lang.Double> compute​(long... dataset)
      Computes the quantile values of the given dataset.
      java.util.Map<java.lang.Integer,​java.lang.Double> compute​(java.util.Collection<? extends java.lang.Number> dataset)
      Computes the quantile values of the given dataset.
      java.util.Map<java.lang.Integer,​java.lang.Double> computeInPlace​(double... dataset)
      Computes the quantile values of the given dataset, performing the computation in-place.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • compute

        public java.util.Map<java.lang.Integer,​java.lang.Double> compute​(java.util.Collection<? extends java.lang.Number> dataset)
        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, ordered map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values. When iterating, entries in the map are ordered by quantile index in the same order they were passed to the indexes method.
      • compute

        public java.util.Map<java.lang.Integer,​java.lang.Double> compute​(double... dataset)
        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, ordered map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values. When iterating, entries in the map are ordered by quantile index in the same order they were passed to the indexes method.
      • compute

        public java.util.Map<java.lang.Integer,​java.lang.Double> compute​(long... dataset)
        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, ordered map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values. When iterating, entries in the map are ordered by quantile index in the same order they were passed to the indexes method.
      • compute

        public java.util.Map<java.lang.Integer,​java.lang.Double> compute​(int... dataset)
        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, ordered map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values. When iterating, entries in the map are ordered by quantile index in the same order they were passed to the indexes method.
      • computeInPlace

        public java.util.Map<java.lang.Integer,​java.lang.Double> computeInPlace​(double... dataset)
        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, ordered map of results: the keys will be the specified quantile indexes, and the values the corresponding quantile values. When iterating, entries in the map are ordered by quantile index in the same order that the indexes were passed to the indexes method.