HistogramBuilder (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.utils

## Class HistogramBuilder

- java.lang.Object
- - org.apache.cassandra.utils.HistogramBuilder

-     public class HistogramBuilder
      extends java.lang.Object

  Simple class for constructing an EsimtatedHistogram from a set of predetermined values

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HistogramBuilder()`
    `HistogramBuilder(long[] values)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(long value)`
    `EstimatedHistogram` | `buildWithStdevRangesAroundMean()` See `buildWithStdevRangesAroundMean(int)`
    `EstimatedHistogram` | `buildWithStdevRangesAroundMean(int maxdevs)` Calculate the min, mean, max and standard deviation of the items in the builder, and generate an EstimatedHistogram with upto `maxdev` stdev size ranges either side of the mean, until min/max are hit; if either min/max are not reached a further range is inserted at the relevant ends.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HistogramBuilder

          public HistogramBuilder()

    - #### HistogramBuilder

          public HistogramBuilder(long[] values)

  - ### Method Detail

    - #### add

          public void add(long value)

    - #### buildWithStdevRangesAroundMean

          public EstimatedHistogram buildWithStdevRangesAroundMean()

      See `buildWithStdevRangesAroundMean(int)`
      Returns:
        buildWithStdevRangesAroundMean(3)

    - #### buildWithStdevRangesAroundMean

          public EstimatedHistogram buildWithStdevRangesAroundMean(int maxdevs)

      Calculate the min, mean, max and standard deviation of the items in the builder, and generate an EstimatedHistogram with upto `maxdev` stdev size ranges either side of the mean, until min/max are hit; if either min/max are not reached a further range is inserted at the relevant ends. e.g., with a `maxdevs` of 3, there may be up to 8 ranges (between 9 boundaries, the middle being the mean); the middle 6 will have the same size (stdev) with the outermost two stretching out to min and max.
      Parameters:
        `maxdevs` -
      Returns:

Copyright © 2014 The Apache Software Foundation