public class StreamingHistogram
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StreamingHistogram.StreamingHistogramSerializer |
| Modifier and Type | Field and Description |
|---|---|
static StreamingHistogram.StreamingHistogramSerializer |
serializer |
| Constructor and Description |
|---|
StreamingHistogram(int maxBinSize)
Creates a new histogram with max bin size of maxBinSize
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
java.util.Map<java.lang.Double,java.lang.Long> |
getAsMap() |
int |
hashCode() |
void |
merge(StreamingHistogram other)
Merges given histogram with this histogram.
|
double |
sum(double b)
Calculates estimated number of points in interval [-inf,b].
|
void |
update(double p)
Adds new point p to this histogram.
|
void |
update(double p,
long m)
Adds new point p with value m to this histogram.
|
public static final StreamingHistogram.StreamingHistogramSerializer serializer
public StreamingHistogram(int maxBinSize)
maxBinSize - maximum number of bins this histogram can havepublic void update(double p)
p - public void update(double p,
long m)
p - m - public void merge(StreamingHistogram other)
other - histogram to mergepublic double sum(double b)
b - upper bound of a interval to calculate sumpublic java.util.Map<java.lang.Double,java.lang.Long> getAsMap()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2016 The Apache Software Foundation