Class AggSpecMedian

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

@Immutable public abstract class AggSpecMedian extends AggSpecBase
Specifier for a column aggregation that produces a median value from the input column's values for each group. Only works for numeric or Comparable input types.
  • Field Details

    • AVERAGE_EVENLY_DIVIDED_DEFAULT

      public static final boolean AVERAGE_EVENLY_DIVIDED_DEFAULT
      See Also:
  • Constructor Details

    • AggSpecMedian

      public AggSpecMedian()
  • Method Details

    • of

      public static AggSpecMedian of()
      Create a new AggSpecMedian with averageEvenlyDivided of true.
      Returns:
      the agg spec
    • of

      public static AggSpecMedian of(boolean averageEvenlyDivided)
      Create a new AggSpecMedian.
      Parameters:
      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
    • 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