public class NormalHistogram<T> extends java.lang.Object implements Histogram<T>
Modifier and Type | Field and Description |
---|---|
protected BucketFunction<? extends T> |
f |
Constructor and Description |
---|
NormalHistogram(BucketFunction<? extends T> f) |
Modifier and Type | Method and Description |
---|---|
static TimeScaleNormalHistogram |
buckets(BucketFunction<java.lang.Double> bucketFunction,
java.util.concurrent.TimeUnit timeScale) |
static <T> NormalHistogram<T> |
buckets(BucketFunction<T> bucketFunction) |
static BucketFunction<java.lang.Double> |
exponential(double start,
double exp,
int count) |
java.util.Collection<Bucket<T>> |
getBuckets() |
static BucketFunction<java.lang.Double> |
linear(double start,
double width,
int count) |
void |
observe(double value)
Add a sample
|
protected final BucketFunction<? extends T> f
public NormalHistogram(BucketFunction<? extends T> f)
public void observe(double value)
Histogram
public java.util.Collection<Bucket<T>> getBuckets()
getBuckets
in interface Histogram<T>
public static <T> NormalHistogram<T> buckets(BucketFunction<T> bucketFunction)
public static TimeScaleNormalHistogram buckets(BucketFunction<java.lang.Double> bucketFunction, java.util.concurrent.TimeUnit timeScale)
public static BucketFunction<java.lang.Double> linear(double start, double width, int count)
start
- Leftmost bucketwidth
- The interval between bucketscount
- The total number of buckets, yielding count
-1 intervals between them.public static BucketFunction<java.lang.Double> exponential(double start, double exp, int count)
start
- Leftmost bucket is start*factor.exp
- The exponent.count
- The total number of buckets, yielding count
-1 intervals between them.