/** * Typed Statistics Functions (Parallel-First) * * AssemblyScript-friendly TypeScript implementations with typed-function * integration and workerpool parallel execution. * * Following the parallel-first philosophy per CLAUDE.md: * - Use workers for ALL array transformations (Float64Array) * - Use workers for ALL numerical computations that can be batched * - Only fall back to sequential for trivial scalar operations * * @packageDocumentation */ /** 64-bit float (default for decimals) */ type f64 = number; /** 32-bit signed integer */ type i32 = number; /** * Normalization type for variance computation */ export type NormalizationType = 'unbiased' | 'uncorrected' | 'biased'; /** * Parallel sum with typed-function dispatch */ export declare const parallelStatSum: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel mean with typed-function dispatch */ export declare const parallelStatMean: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel variance with typed-function dispatch * * Uses Welford's algorithm for numerical stability */ export declare const parallelStatVariance: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel standard deviation with typed-function dispatch */ export declare const parallelStatStd: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel minimum with typed-function dispatch */ export declare const parallelStatMin: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel maximum with typed-function dispatch */ export declare const parallelStatMax: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel minmax with typed-function dispatch * Returns both min and max in a single pass */ export declare const parallelStatMinMax: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel median with typed-function dispatch * * Note: Median requires sorting which is O(n log n) */ export declare const parallelStatMedian: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel mode with typed-function dispatch * Returns the most frequently occurring value(s) */ export declare const parallelStatMode: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel product with typed-function dispatch */ export declare const parallelStatProd: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel Euclidean norm (L2 norm) with typed-function dispatch */ export declare const parallelStatNorm: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel Euclidean distance with typed-function dispatch */ export declare const parallelStatDistance: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel Pearson correlation coefficient */ export declare const parallelStatCorr: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel Mean Absolute Deviation */ export declare const parallelStatMAD: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel cumulative sum */ export declare const parallelStatCumsum: import("@danielsimonjr/mathts-core").TypedFunction; /** * Parallel quantile computation */ export declare const parallelStatQuantile: import("@danielsimonjr/mathts-core").TypedFunction; /** * Compute the p-th percentile of a Float64Array. * * Identical to `parallelStatQuantile(data, p / 100)`. * Uses WASM sort acceleration above WASM_SORT_THRESHOLD elements. * * @param data - Input data array. * @param p - Percentile in [0, 100]. */ export declare function parallelStatPercentile(data: Float64Array, p: f64): f64; /** * Parallel histogram computation */ export declare const parallelStatHistogram: import("@danielsimonjr/mathts-core").TypedFunction; /** * Select the k-th smallest element from an array using Hoare's quickselect algorithm. * Average O(n) time complexity. * * @param arr - Input array (not modified) * @param k - Zero-based index of the desired order statistic * @returns The k-th smallest element */ export declare function quickSelect(arr: number[], k: i32): f64; /** * Find the median of an array in O(n) average time using quickselect. * * @param arr - Input array (not modified) * @returns The median value */ export declare function medianSelect(arr: number[]): f64; /** * Find the k smallest elements from an array. * * @param arr - Input array (not modified) * @param k - Number of smallest elements to return * @returns Array of k smallest elements, sorted ascending */ export declare function minSelect(arr: number[], k: i32): number[]; /** * Find the k largest elements from an array. * * @param arr - Input array (not modified) * @param k - Number of largest elements to return * @returns Array of k largest elements, sorted descending */ export declare function maxSelect(arr: number[], k: i32): number[]; /** * Primary export: typed statistics functions */ export declare const typedStatistics: { sum: import("@danielsimonjr/mathts-core").TypedFunction; mean: import("@danielsimonjr/mathts-core").TypedFunction; variance: import("@danielsimonjr/mathts-core").TypedFunction; std: import("@danielsimonjr/mathts-core").TypedFunction; min: import("@danielsimonjr/mathts-core").TypedFunction; max: import("@danielsimonjr/mathts-core").TypedFunction; minMax: import("@danielsimonjr/mathts-core").TypedFunction; median: import("@danielsimonjr/mathts-core").TypedFunction; mode: import("@danielsimonjr/mathts-core").TypedFunction; prod: import("@danielsimonjr/mathts-core").TypedFunction; norm: import("@danielsimonjr/mathts-core").TypedFunction; distance: import("@danielsimonjr/mathts-core").TypedFunction; corr: import("@danielsimonjr/mathts-core").TypedFunction; mad: import("@danielsimonjr/mathts-core").TypedFunction; cumsum: import("@danielsimonjr/mathts-core").TypedFunction; quantile: import("@danielsimonjr/mathts-core").TypedFunction; percentile: typeof parallelStatPercentile; histogram: import("@danielsimonjr/mathts-core").TypedFunction; quickSelect: typeof quickSelect; medianSelect: typeof medianSelect; minSelect: typeof minSelect; maxSelect: typeof maxSelect; }; /** * Initialize statistics processing pool */ export declare function initializeStatistics(): Promise; /** * Terminate statistics processing pool */ export declare function terminateStatistics(): Promise; export {}; //# sourceMappingURL=statistics.d.ts.map