higlass
Version:
HiGlass Hi-C / genomic / large data viewer
11 lines (10 loc) • 606 B
TypeScript
export default getAggregationFunction;
export type Aggregation = (values: number[]) => number | undefined;
/** @typedef {(values: number[]) => number | undefined} Aggregation */
/**
* Get an aggregation function from a function name.
* @param {'mean' | 'sum' | 'variance' | 'deviation'} name - The type of aggregation.
* If an unknown string is passed, the mean function will be used (and a warning will be logged).
* @returns {Aggregation} The function of interest as determined by the string,
*/
declare function getAggregationFunction(name: "mean" | "sum" | "variance" | "deviation"): Aggregation;