Class AggSpecPercentile

java.lang.Object
io.deephaven.api.agg.spec.AggSpecBase
io.deephaven.api.agg.spec.AggSpecPercentile
All Implemented Interfaces:
AggSpec

@Immutable public abstract class AggSpecPercentile extends AggSpecBase
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.
  • Field Details

    • AVERAGE_EVENLY_DIVIDED

      public static final boolean AVERAGE_EVENLY_DIVIDED
      See Also:
  • Constructor Details

    • AggSpecPercentile

      public AggSpecPercentile()
  • Method Details

    • of

      public static AggSpecPercentile of(double percentile)
      Create a new AggSpecPercentile with averageEvenlyDivided of false.
      Parameters:
      percentile - the percentile
      Returns:
      the agg spec
    • of

      public static AggSpecPercentile of(double percentile, boolean averageEvenlyDivided)
      Create a new AggSpecPercentile.
      Parameters:
      percentile - the percentile
      averageEvenlyDivided - see averageEvenlyDivided()
      Returns:
      the agg spec
    • description

      public final String 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

      public final <V extends AggSpec.Visitor> V walk(V visitor)
      Description copied from interface: AggSpec
      Glue method to deliver this AggSpec to a AggSpec.Visitor.
      Parameters:
      visitor - The visitor
      Returns:
      The visitor