Package io.deephaven.api.agg.spec
Class AggSpecPercentile
java.lang.Object
io.deephaven.api.agg.spec.AggSpecBase
io.deephaven.api.agg.spec.AggSpecPercentile
- All Implemented Interfaces:
AggSpec
Specifier for a column aggregation that produces a percentile value from the input column's values for each group.
Only works for numeric or
Comparable
input types.-
Nested Class Summary
Nested classes/interfaces inherited from interface io.deephaven.api.agg.spec.AggSpec
AggSpec.Visitor
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionabstract boolean
Whether to average the highest low-bucket value and lowest high-bucket value, when the low-bucket and high-bucket are of equal size.final String
Get a simple description for this AggSpec.static AggSpecPercentile
of
(double percentile) Create a new AggSpecPercentile withaverageEvenlyDivided
of false.static AggSpecPercentile
of
(double percentile, boolean averageEvenlyDivided) Create a new AggSpecPercentile.abstract double
The percentile to calculate.final <V extends AggSpec.Visitor>
Vwalk
(V visitor) Glue method to deliver this AggSpec to aAggSpec.Visitor
.Methods inherited from class io.deephaven.api.agg.spec.AggSpecBase
aggregation, aggregation, aggregation
-
Field Details
-
AVERAGE_EVENLY_DIVIDED
public static final boolean AVERAGE_EVENLY_DIVIDED- See Also:
-
-
Constructor Details
-
AggSpecPercentile
public AggSpecPercentile()
-
-
Method Details
-
of
Create a new AggSpecPercentile withaverageEvenlyDivided
of false.- Parameters:
percentile
- the percentile- Returns:
- the agg spec
-
of
Create a new AggSpecPercentile.- Parameters:
percentile
- the percentileaverageEvenlyDivided
- seeaverageEvenlyDivided()
- Returns:
- the agg spec
-
description
Description copied from interface:AggSpec
Get a simple description for this AggSpec.- Returns:
- The description
-
percentile
@Parameter public abstract double percentile()The percentile to calculate. Must be >= 0.0 and <= 1.0.- Returns:
- The percentile to calculate
-
averageEvenlyDivided
@Parameter public abstract boolean averageEvenlyDivided()Whether to average the highest low-bucket value and lowest high-bucket value, when the low-bucket and high-bucket are of equal size. Only applies to numeric types.- Returns:
- Whether to average the two result candidates for evenly-divided input sets of numeric types
-
walk
Description copied from interface:AggSpec
Glue method to deliver this AggSpec to aAggSpec.Visitor
.- Parameters:
visitor
- The visitor- Returns:
- The visitor
-