public class InternalStatisticalFacet extends InternalFacet implements StatisticalFacet
InternalFacet.ReduceContext, InternalFacet.Stream, InternalFacet.Streams
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
TYPE
EMPTY_PARAMS
Constructor and Description |
---|
InternalStatisticalFacet(String name,
double min,
double max,
double total,
double sumOfSquares,
long count) |
Modifier and Type | Method and Description |
---|---|
long |
getCount()
The number of values counted.
|
double |
getMax()
The maximum value.
|
double |
getMean()
The mean (average) of the values.
|
double |
getMin()
The minimum value.
|
double |
getStdDeviation()
Standard deviation of the values.
|
double |
getSumOfSquares()
The sum of squares of the values.
|
double |
getTotal()
The total (sum) of values.
|
String |
getType()
The type of the facet.
|
double |
getVariance()
Variance of the values.
|
void |
readFrom(StreamInput in) |
static StatisticalFacet |
readStatisticalFacet(StreamInput in) |
Facet |
reduce(InternalFacet.ReduceContext context) |
static void |
registerStreams() |
BytesReference |
streamType() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
getName
public InternalStatisticalFacet(String name, double min, double max, double total, double sumOfSquares, long count)
public static void registerStreams()
public BytesReference streamType()
streamType
in class InternalFacet
public long getCount()
StatisticalFacet
getCount
in interface StatisticalFacet
public double getTotal()
StatisticalFacet
getTotal
in interface StatisticalFacet
public double getSumOfSquares()
StatisticalFacet
getSumOfSquares
in interface StatisticalFacet
public double getMean()
StatisticalFacet
getMean
in interface StatisticalFacet
public double getMin()
StatisticalFacet
getMin
in interface StatisticalFacet
public double getMax()
StatisticalFacet
getMax
in interface StatisticalFacet
public double getVariance()
StatisticalFacet
getVariance
in interface StatisticalFacet
public double getStdDeviation()
StatisticalFacet
getStdDeviation
in interface StatisticalFacet
public Facet reduce(InternalFacet.ReduceContext context)
reduce
in class InternalFacet
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
public static StatisticalFacet readStatisticalFacet(StreamInput in) throws IOException
IOException
public void readFrom(StreamInput in) throws IOException
readFrom
in interface Streamable
readFrom
in class InternalFacet
IOException
public void writeTo(StreamOutput out) throws IOException
writeTo
in interface Streamable
writeTo
in class InternalFacet
IOException
Copyright © 2009–2015. All rights reserved.