UNPKG

@codibre/fluent-iterable

Version:

Provides LINQ-like fluent api operations for iterables and async iterables (ES2018+).

47 lines (46 loc) 1.18 kB
import { AverageStepper } from './../types/base'; /** * A structure to controls the calculation of iterative means */ export interface MinMaxStepper { /** * Return the current avg/mean */ readonly min: number; /** * Return the current avg/mean */ readonly max: number; /** * Advance one min/max step */ step(y: number): number; } /** * A structure to controls the calculation of iterative means */ export interface StatsStepper extends AverageStepper, MinMaxStepper { /** * Return the current avg/mean */ readonly populationStdDev: number; /** * Return the current avg/mean */ readonly populationVariance: number; /** * Return the current avg/mean */ readonly sampleStdDev: number; /** * Return the current avg/mean */ readonly sampleVariance: number; } export declare function getMinMaxStepper(): MinMaxStepper; /** * Stepper to calculate many statistical measures, like * min, max, population standard deviation, population variance, * sample standard deviation and sample variance */ export declare function getStatsStepper(): StatsStepper;