@PSOperatorWrapper public class StatisticOperators extends java.lang.Object
Constructor and Description |
---|
StatisticOperators() |
Modifier and Type | Method and Description |
---|---|
static Function<java.util.List<Item>,java.lang.Integer> |
count()
Count the number of items in the stream and output the number.
|
static Function<java.util.List<Item>,java.lang.Integer> |
count(java.lang.String field)
Count the number of valid fields in the stream and output the number.
|
static Function<java.util.List<Item>,java.lang.Number> |
max(java.lang.String numField)
Get the max value of a field in the stream.
|
static Function<java.util.List<Item>,java.lang.Double> |
mean(java.lang.String numField)
Calculate the average of the number values of a field in the stream.
|
static Function<java.util.List<Item>,java.lang.Number> |
median(java.lang.String numField)
Get the median value of a field in the stream.
|
static Function<java.util.List<Item>,java.lang.Number> |
min(java.lang.String numField)
Get the min value of a field in the stream.
|
static Function<java.util.List<Item>,java.lang.Number> |
mode(java.lang.String numField)
Get the mode value of a field in the stream.
|
static Function<java.util.List<Item>,java.lang.Double> |
range(java.lang.String numField)
Calculate the range of the number values of a field in the stream.
|
static Function<java.util.List<Item>,java.lang.Double> |
rms(java.lang.String numField)
Calculate the RMS (root mean square) of the number values of a field in the stream.
|
static Function<java.util.List<Item>,java.lang.Double> |
sum(java.lang.String numField)
Calculate the sum of the number values of a field in the stream.
|
static Function<java.util.List<Item>,java.lang.Double> |
variance(java.lang.String numField)
Calculate the variance of the number values of a field in the stream.
|
public static Function<java.util.List<Item>,java.lang.Integer> count()
public static Function<java.util.List<Item>,java.lang.Integer> count(java.lang.String field)
field
- the name of the field to countpublic static Function<java.util.List<Item>,java.lang.Double> range(java.lang.String numField)
numField
- the name of the field, the field value must be a number.public static Function<java.util.List<Item>,java.lang.Double> sum(java.lang.String numField)
numField
- the name of the field, the field value must be a number.public static Function<java.util.List<Item>,java.lang.Double> mean(java.lang.String numField)
numField
- the name of the field, the field value must be a number.public static Function<java.util.List<Item>,java.lang.Double> rms(java.lang.String numField)
numField
- the name of the field, the field value must be a number.public static Function<java.util.List<Item>,java.lang.Double> variance(java.lang.String numField)
numField
- the name of the field, the field value must be a number.public static Function<java.util.List<Item>,java.lang.Number> max(java.lang.String numField)
numField
- the name of the field, the field value must be a number.public static Function<java.util.List<Item>,java.lang.Number> min(java.lang.String numField)
numField
- the name of the field, the field value must be a number.public static Function<java.util.List<Item>,java.lang.Number> median(java.lang.String numField)
numField
- the name of the field, the field value must be a number.public static Function<java.util.List<Item>,java.lang.Number> mode(java.lang.String numField)
numField
- the name of the field, the field value must be a number.