Expand description
§Aggregation Kernels Module - High-Performance Statistical Reduction Operations
Null-aware aggregation kernels implementing statistical reductions with SIMD acceleration. Core building blocks for analytical workloads requiring high-throughput data summarisation.
§Core Operations
- Sum aggregation: Optimised summation with overflow handling and numerical stability
- Min/Max operations: Efficient extrema detection with proper null handling
- Count operations: Fast counting with distinct value detection capabilities
- Statistical moments: Mean, variance, and standard deviation calculations
- Percentile calculations: Quantile computation with interpolation support
- String aggregation: Concatenation and string-based reduction operations
Structs§
- Pair
Stats - Statistical summary for paired data analysis.
Constants§
- W8
- Auto-generated SIMD lane widths from build.rs
SIMD lane count for 8-bit elements (u8, i8).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W16
- SIMD lane count for 16-bit elements (u16, i16).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W32
- SIMD lane count for 32-bit elements (u32, i32, f32).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE. - W64
- SIMD lane count for 64-bit elements (u64, i64, f64).
Determined at build time based on target architecture capabilities,
or overridden via
SIMD_LANES_OVERRIDE.
Functions§
- agg_
product - Returns the accumulating product of all values
- average_
f32 - Returns the average of
f32values, or None if all-null. - average_
f64 - Returns the average of
f64values, or None if all-null. - average_
i32 - Returns the average of
i32values, or None if all-null. - average_
i64 - Returns the average of
i64values, or None if all-null. - average_
u32 - Returns the average of
u32values, or None if all-null. - average_
u64 - Returns the average of
u64values, or None if all-null. - count_
distinct - Counts distinct values in an ordinal slice, with optional nulls.
- count_
distinct_ f - Counts distinct values in a float slice using bitwise equality.
- count_
generic_ raw - Returns the number of valid (non-null) elements.
- geometric_
mean_ f - Computes geometric mean for float types.
- geometric_
mean_ int - Computes geometric mean for integer types.
- geometric_
mean_ uint - Computes geometric mean for unsigned integer types.
- harmonic_
mean_ f - Computes harmonic mean for float types.
- harmonic_
mean_ int - Computes harmonic mean for integer types.
- harmonic_
mean_ uint - Computes harmonic mean for unsigned integers.
- iqr
- Computes interquartile range for ordinal types.
- iqr_f
- Computes interquartile range for float types.
- kurtosis_
f32 - Calculates the kurtosis of a floating-point dataset.
- kurtosis_
f64 - Calculates the kurtosis of a floating-point dataset.
- kurtosis_
i32 - Calculates the kurtosis of an integer dataset.
- kurtosis_
i64 - Calculates the kurtosis of an integer dataset.
- kurtosis_
u32 - Calculates the kurtosis of an integer dataset.
- kurtosis_
u64 - Calculates the kurtosis of an integer dataset.
- max_f32
- Returns the maximum of a
f32slice. - max_f64
- Returns the maximum of a
f64slice. - max_i32
- Returns the maximum of a
i32slice. - max_i64
- Returns the maximum of a
i64slice. - max_u32
- Returns the maximum of a
u32slice. - max_u64
- Returns the maximum of a
u64slice. - median
- Computes median of a sorted/unsorted slice with optional nulls.
- median_
f - Computes median for float types, with optional nulls and sorting.
- min_f32
- Returns the minimum of a
f32slice. - min_f64
- Returns the minimum of a
f64slice. - min_i32
- Returns the minimum of a
i32slice. - min_i64
- Returns the minimum of a
i64slice. - min_u32
- Returns the minimum of a
u32slice. - min_u64
- Returns the minimum of a
u64slice. - mode
- Computes mode (most frequent value) for ordinal types.
- mode_f
- Computes mode for float types via bit-level equivalence.
- pair_
stats_ f32 - Returns PairStats (n, sum_x, sum_y, sum_xy, sum_x2, sum_y2) for floating point types.
- pair_
stats_ f64 - Returns PairStats (n, sum_x, sum_y, sum_xy, sum_x2, sum_y2) for floating point types.
- percentile_
f - Computes percentile for float types, optionally sorted.
- percentile_
ord - Computes percentile for ordinal types, optionally sorted.
- quantile
- Computes
qquantiles for ordinal types, optionally sorted. - quantile_
f - Computes
qquantiles for float types, optionally sorted. - range_
f32 - Returns the (min, max) of a
f32slice. - range_
f64 - Returns the (min, max) of a
f64slice. - range_
i32 - Returns the (min, max) of a
i32slice. - range_
i64 - Returns the (min, max) of a
i64slice. - range_
u32 - Returns the (min, max) of a
u32slice. - range_
u64 - Returns the (min, max) of a
u64slice. - reduce_
min_ max_ f32 - Finds the minimum and maximum values in a floating-point slice.
- reduce_
min_ max_ f64 - Finds the minimum and maximum values in a floating-point slice.
- reduce_
min_ max_ i32 - Finds the minimum and maximum values in a numeric slice.
- reduce_
min_ max_ i64 - Finds the minimum and maximum values in a numeric slice.
- reduce_
min_ max_ u32 - Finds the minimum and maximum values in a numeric slice.
- reduce_
min_ max_ u64 - Finds the minimum and maximum values in a numeric slice.
- skewness_
f32 - Calculates the skewness of a floating-point dataset.
- skewness_
f64 - Calculates the skewness of a floating-point dataset.
- skewness_
i32 - Calculates the skewness of an integer dataset.
- skewness_
i64 - Calculates the skewness of an integer dataset.
- skewness_
u32 - Calculates the skewness of an integer dataset.
- skewness_
u64 - Calculates the skewness of an integer dataset.
- stat_
moments4_ f32 - SIMD-accelerated (∑x … ∑x⁴) for
f32. Returns(s1,s2,s3,s4,n)as(f64,f64,f64,f64,usize). - stat_
moments4_ f64 - SIMD-accelerated (∑x … ∑x⁴) for
f64. Returns(s1,s2,s3,s4,n)as(f64,f64,f64,f64,usize). - stat_
moments4_ i32 - SIMD-accelerated (∑x … ∑x⁴) for
i32(promoted to f64). Accumulator type for scalar paths:i128. - stat_
moments4_ i64 - SIMD-accelerated (∑x … ∑x⁴) for
i64(promoted to f64). Accumulator type for scalar paths:i128. - stat_
moments4_ u32 - SIMD-accelerated (∑x … ∑x⁴) for
u32(promoted to f64). Accumulator type for scalar paths:u128. - stat_
moments4_ u64 - SIMD-accelerated (∑x … ∑x⁴) for
u64(promoted to f64). Accumulator type for scalar paths:u128. - stat_
moments_ f32 - Computes sum, sum-of-squares, and count for a
f32slice. Skips nulls if present. Uses SIMD if available. - stat_
moments_ f64 - Computes sum, sum-of-squares, and count for a
f64slice. Skips nulls if present. Uses SIMD if available. - stat_
moments_ i32 - Computes sum, sum-of-squares, and count for
i32integers. Usesi64for accumulation. Skips nulls if present. - stat_
moments_ i64 - Computes sum, sum-of-squares, and count for
i64integers. Usesi64for accumulation. Skips nulls if present. - stat_
moments_ u32 - Computes sum, sum-of-squares, and count for
u32integers. Usesu64for accumulation. Skips nulls if present. - stat_
moments_ u64 - Computes sum, sum-of-squares, and count for
u64integers. Usesu64for accumulation. Skips nulls if present. - sum2_
f32_ raw - Computes sum-of-squares for
f32(Σx²). Skips nulls if present. SIMD‐enabled. - sum2_
f64_ raw - Computes sum-of-squares for
f64(Σx²). Skips nulls if present. SIMD‐enabled. - sum_
cubes - Computes the sum of cubes (Σx³). Kernel: SumP3 (L1-3)
- sum_f32
- Returns the sum of
f32values, or None if all-null. - sum_f64
- Returns the sum of
f64values, or None if all-null. - sum_
f32_ raw - Returns (sum, count) for non-null
f32values. Uses SIMD where available. - sum_
f64_ raw - Returns (sum, count) for non-null
f64values. Uses SIMD where available. - sum_i32
- Returns the sum of
i32values, or None if all-null. - sum_i64
- Returns the sum of
i64values, or None if all-null. - sum_
i32_ raw - Returns (sum, count) for non-null
i32values. Accumulates usingi64. Uses SIMD if available. - sum_
i64_ raw - Returns (sum, count) for non-null
i64values. Accumulates usingi64. Uses SIMD if available. - sum_
quartics - Computes the sum of fourth powers (Σx⁴). Kernel: SumP4 (L1-4)
- sum_
squares - Computes the sum of squares (Σx²). Kernel: SumP2 (L1-2)
- sum_u32
- Returns the sum of
u32values, or None if all-null. - sum_u64
- Returns the sum of
u64values, or None if all-null. - sum_
u32_ raw - Returns (sum, count) for non-null
u32values. Accumulates usingu64. Uses SIMD if available. - sum_
u64_ raw - Returns (sum, count) for non-null
u64values. Accumulates usingu64. Uses SIMD if available. - variance_
f32 - Returns the variance for
f32; ifsampleis true, uses Bessel’s correction (n-1). - variance_
f64 - Returns the variance for
f64; ifsampleis true, uses Bessel’s correction (n-1). - variance_
i32 - Returns the variance for
i32; ifsampleis true, uses Bessel’s correction (n-1). - variance_
i64 - Returns the variance for
i64; ifsampleis true, uses Bessel’s correction (n-1). - variance_
u32 - Returns the variance for
u32; ifsampleis true, uses Bessel’s correction (n-1). - variance_
u64 - Returns the variance for
u64; ifsampleis true, uses Bessel’s correction (n-1). - weighted_
sum2_ f32 - Returns
(∑w·x, ∑w, ∑w·x², rows)forf32slicesvals,wtswith optional null mask. - weighted_
sum2_ f64 - Returns
(∑w·x, ∑w, ∑w·x², rows)forf64slicesvals,wtswith optional null mask.