import { Selector, Predicate } from '../types'; /** * Sum of items in array. * @param array The array to process. * @param elementSelector Function invoked per iteration. * @returns Sum of array. * @public * @example * sum([1, 2, 5]); // 8 * * sum([{ val: 1 }, { val: 5 }], i => i.val); // 6 */ export declare function sum(array: any[], field?: Selector | string): number | null; /** * Average of array items. * @param array The array to process. * @param elementSelector Function invoked per iteration. * @public * @example * avg([1, 5, 3]); // 3 */ export declare function avg(array: any[], field?: Selector | string): number | null; /** * Computes the minimum value of array. * @param array The array to process. * @param elementSelector Function invoked per iteration. */ export declare function min(array: any[], field?: Selector | string): number | Date | null; /** * Computes the maximum value of array. * @public * @param array The array to process. * @param elementSelector Function invoked per iteration. */ export declare function max(array: any[], field?: Selector | string): number | Date | null; /** * Count of elements in array. * @public * @param array The array to process. * @param predicate Predicate function invoked per iteration. */ export declare function count(array: any[], predicate?: Predicate): number | null; /** * Gets first item in array satisfies predicate. * @param array The array to process. * @param predicate Predicate function invoked per iteration. */ export declare function first(array: T[], predicate?: Predicate): T | null; /** * Gets last item in array satisfies predicate. * @param array The array to process. * @param predicate Predicate function invoked per iteration. */ export declare function last(array: T[], predicate?: Predicate): T | null; /** * Gets counts map of values returned by `elementSelector`. * @param array The array to process. * @param elementSelector Function invoked per iteration. */ export declare function countBy(array: any[], elementSelector: Selector): Record; /** * Get mean of an array. * @param array The array to process. * @param field Property name or Selector function invoked per iteration. */ export declare function mean(array: any[], field?: Selector | string): number | null; /** * Get quantile of a sorted array. * @param array The array to process. * @param field Property name or Selector function invoked per iteration. * @param p quantile. */ export declare function quantile(array: any[], p: number, field?: Selector | string): number | null; /** * Get sample variance of an array. * @param array The array to process. * @param field Property name or Selector function invoked per iteration. */ export declare function variance(array: any[], field?: Selector | string): number | null; /** * Get the sample standard deviation of an array. * @param array The array to process. * @param field Property name or Selector function invoked per iteration. */ export declare function stdev(array: any[], field?: Selector | string): number | null; /** * Get median of an array. * @param array The array to process. * @param field Property name or Selector function invoked per iteration. */ export declare function median(array: any[], field?: Selector | string): number | null; //# sourceMappingURL=stats.d.ts.map