public class InternalStatisticalFacet extends InternalFacet implements StatisticalFacet
InternalFacet.ReduceContext, InternalFacet.Stream, InternalFacet.StreamsToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsTYPEEMPTY_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) |
getNamepublic InternalStatisticalFacet(String name, double min, double max, double total, double sumOfSquares, long count)
public static void registerStreams()
public BytesReference streamType()
streamType in class InternalFacetpublic long getCount()
StatisticalFacetgetCount in interface StatisticalFacetpublic double getTotal()
StatisticalFacetgetTotal in interface StatisticalFacetpublic double getSumOfSquares()
StatisticalFacetgetSumOfSquares in interface StatisticalFacetpublic double getMean()
StatisticalFacetgetMean in interface StatisticalFacetpublic double getMin()
StatisticalFacetgetMin in interface StatisticalFacetpublic double getMax()
StatisticalFacetgetMax in interface StatisticalFacetpublic double getVariance()
StatisticalFacetgetVariance in interface StatisticalFacetpublic double getStdDeviation()
StatisticalFacetgetStdDeviation in interface StatisticalFacetpublic Facet reduce(InternalFacet.ReduceContext context)
reduce in class InternalFacetpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent in interface ToXContentIOExceptionpublic static StatisticalFacet readStatisticalFacet(StreamInput in) throws IOException
IOExceptionpublic void readFrom(StreamInput in) throws IOException
readFrom in interface StreamablereadFrom in class InternalFacetIOExceptionpublic void writeTo(StreamOutput out) throws IOException
writeTo in interface StreamablewriteTo in class InternalFacetIOExceptionCopyright © 2009–2016. All rights reserved.