Class StaticPercentileOperator

java.lang.Object
io.deephaven.engine.table.impl.by.staticpercentile.StaticPercentileOperator
All Implemented Interfaces:
IterativeChunkedAggregationOperator
Direct Known Subclasses:
ByteStaticPercentileOperator, CharStaticPercentileOperator, DoubleStaticPercentileOperator, FloatStaticPercentileOperator, IntStaticPercentileOperator, LongStaticPercentileOperator, ShortStaticPercentileOperator

public abstract class StaticPercentileOperator extends Object implements IterativeChunkedAggregationOperator
Percentile operator for static tables. Each destination accumulates its non-null values into an array; when the initial state is propagated, an introselect finds the value at the percentile's position in each array. The arrays are released once the results are computed.

The selected positions match SsmChunkedPercentileOperator. With averageEvenlyDivided, the low count is (int) ((size - 1) * percentile) + 1, and when it is exactly half of the values the result averages the low maximum with the high minimum. Otherwise the low count is Math.round((size - 1) * percentile) + 1 and the result is the low maximum.