UNPKG

@thi.ng/tensors

Version:

0D/1D/2D/3D/4D tensors with extensible polymorphic operations and customizable storage

25 lines 651 B
import type { ITensor1 } from "./api.js"; /** * Computes the cumulative distribution of `a` and writes it to `out`. If `out` * is null, mutates `a` in place. * * @remarks * Reference: * * - https://en.wikipedia.org/wiki/Cumulative_distribution_function * * @example * ```ts tangle:../export/cdf.ts * import { cdf, tensor } from "@thi.ng/tensors"; * * const a = tensor("num", [10], {data: [0,0,1,0,0,1,0,1,1,0]}); * * console.log([...cdf(null, a)]); * // [ 0, 0, 1, 1, 1, 2, 2, 3, 4, 4 ] * ``` * * @param out * @param a */ export declare const cdf: (out: ITensor1 | null, a: ITensor1) => ITensor1; //# sourceMappingURL=cdf.d.ts.map