public class MedianStatsCollector extends AbstractDelegatingStatsCollector
MedianStatsCollector
computes the median.Modifier and Type | Field and Description |
---|---|
protected double |
median |
delegate, statsList
Constructor and Description |
---|
MedianStatsCollector(StatsCollector delegate) |
Modifier and Type | Method and Description |
---|---|
void |
collect(int doc)
Collect values from the value source and add to statistics.
|
void |
compute()
After all documents have been collected, this method should be
called to finalize the calculations of each statistic.
|
Double |
getMedian() |
Comparable |
getStat(String stat)
Return the value of the given statistic.
|
delegate, getFunction, getStatsList, getValue, setNextReader, valueSourceString
public MedianStatsCollector(StatsCollector delegate)
public Double getMedian()
public Comparable getStat(String stat)
StatsCollector
stat
- the statpublic void compute()
StatsCollector
public void collect(int doc)
StatsCollector
collect
in interface StatsCollector
collect
in class AbstractDelegatingStatsCollector
doc
- Document to collect fromCopyright © 2000-2017 Apache Software Foundation. All Rights Reserved.