Class Distribution

  • Direct Known Subclasses:
    AutoValue_Distribution

    @ExperimentalApi
    @Immutable
    public abstract class Distribution
    extends java.lang.Object
    Distribution contains summary statistics for a population of values. It optionally contains a histogram representing the distribution of those values across a set of buckets.
    Since:
    0.17
    • Constructor Detail

      • Distribution

        Distribution()
    • Method Detail

      • create

        public static Distribution create​(long count,
                                          double sum,
                                          double sumOfSquaredDeviations,
                                          Distribution.BucketOptions bucketOptions,
                                          java.util.List<Distribution.Bucket> buckets)
        Creates a Distribution.
        Parameters:
        count - the count of the population values.
        sum - the sum of the population values.
        sumOfSquaredDeviations - the sum of squared deviations of the population values.
        bucketOptions - the bucket options used to create a histogram for the distribution.
        buckets - Distribution.Buckets of a histogram.
        Returns:
        a Distribution.
        Since:
        0.17
      • getCount

        public abstract long getCount()
        Returns the aggregated count.
        Returns:
        the aggregated count.
        Since:
        0.17
      • getSum

        public abstract double getSum()
        Returns the aggregated sum.
        Returns:
        the aggregated sum.
        Since:
        0.17
      • getSumOfSquaredDeviations

        public abstract double getSumOfSquaredDeviations()
        Returns the aggregated sum of squared deviations.

        The sum of squared deviations from the mean of the values in the population. For values x_i this is:

        Sum[i=1..n]((x_i - mean)^2)

        If count is zero then this field must be zero.

        Returns:
        the aggregated sum of squared deviations.
        Since:
        0.17
      • getBucketOptions

        @Nullable
        public abstract Distribution.BucketOptions getBucketOptions()
        Returns bucket options used to create a histogram for the distribution.
        Returns:
        the BucketOptions associated with the Distribution, or null if there isn't one.
        Since:
        0.17