mingo
Version:
MongoDB query language for in-memory objects
13 lines (12 loc) • 563 B
TypeScript
import { Any, Options } from "../../types";
/**
* Returns an array of scalar values that correspond to specified percentile values. Uses "approximate" method by default.
*
* If 'expr.method' is "approximate", we return the closest value to the computed percentile from the dataset.
* If 'expr.method' is "exact", we return the computed percentile value as is which may not be found in the dataset.
*/
export declare const $percentile: (coll: Any[], expr: {
input: Any;
p: Any[];
method: "approximate" | "exact";
}, options: Options) => number[];