java.lang.Object
org.elasticsearch.xpack.core.ml.stats.StatsAccumulator
- All Implemented Interfaces:
Writeable
Helper class to collect min, max, avg and total statistics for a quantity
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(double value) asMap()booleanstatic StatsAccumulatorfromStatsAggregation(Stats statsAggregation) doublegetAvg()doublegetMax()doublegetMin()doublegetTotal()inthashCode()voidmerge(StatsAccumulator other) voidwriteTo(StreamOutput out)
-
Constructor Details
-
StatsAccumulator
public StatsAccumulator() -
StatsAccumulator
- Throws:
IOException
-
-
Method Details
-
add
public void add(double value) -
getMin
public double getMin() -
getMax
public double getMax() -
getAvg
public double getAvg() -
getTotal
public double getTotal() -
merge
-
asMap
-
writeTo
- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
fromStatsAggregation
-
hashCode
public int hashCode() -
equals
-