public class NumericStatsCollector extends MinMaxStatsCollector
NumericStatsCollector computes the sum, sum of squares, mean and standard deviation.| Modifier and Type | Field and Description |
|---|---|
protected double |
mean |
protected double |
stddev |
protected double |
sum |
protected double |
sumOfSquares |
function, max, min, missingCount, source, statsList, value, valueCount, valueFiller| Constructor and Description |
|---|
NumericStatsCollector(ValueSource source,
Set<String> statsList) |
| 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.
|
Comparable |
getStat(String stat)
Return the value of the given statistic.
|
getFunction, getStatsList, getValue, setNextReader, statString, toString, valueSourceStringprotected double sum
protected double sumOfSquares
protected double mean
protected double stddev
public NumericStatsCollector(ValueSource source, Set<String> statsList)
public void collect(int doc)
StatsCollectorcollect in interface StatsCollectorcollect in class MinMaxStatsCollectordoc - Document to collect frompublic Comparable getStat(String stat)
StatsCollectorgetStat in interface StatsCollectorgetStat in class MinMaxStatsCollectorstat - the statpublic void compute()
StatsCollectorcompute in interface StatsCollectorcompute in class MinMaxStatsCollectorCopyright © 2000-2016 Apache Software Foundation. All Rights Reserved.