/** * @upsetjs/math * https://github.com/upsetjs/upsetjs * * Copyright (c) 2022 Samuel Gratzl */ import * as _sgratzl_boxplots from '@sgratzl/boxplots'; import { QuantileMethod } from '@sgratzl/boxplots'; export { QuantileMethod as CustomQuantileMethod, IBoxPlot } from '@sgratzl/boxplots'; declare type QuantilesMethod = 'hinges' | 'fivenum' | 'type7' | 'quantiles' | 'linear' | 'lower' | 'higher' | 'nearest' | 'midpoint'; interface BoxplotStatsOptions { /** * specify the coefficient for the whiskers, use <=0 for getting min/max instead * the coefficient will be multiplied by the IQR * @default 1.5 */ coef?: number; /** * specify the quantile method to use * @default quantilesType7 */ quantiles?: QuantilesMethod | QuantileMethod; /** * defines that it can be assumed that the array is sorted and just contains valid numbers * (which will avoid unnecessary checks and sorting) * @default false */ validAndSorted?: boolean; /** * whiskers mode whether to compute the nearest element which is bigger/smaller than low/high whisker or * the exact value * @default 'nearest' */ whiskersMode?: 'nearest' | 'exact'; /** * delta epsilon to compare * @default 10e-3 */ eps?: number; } declare function boxplot(data: readonly number[] | Float32Array | Float64Array, options?: BoxplotStatsOptions): _sgratzl_boxplots.IBoxPlot; /** * @upsetjs/math * https://github.com/upsetjs/upsetjs * * Copyright (c) 2021 Samuel Gratzl */ declare function rand(seed?: number): () => number; /** * @upsetjs/math * https://github.com/upsetjs/upsetjs * * Copyright (c) 2021 Samuel Gratzl */ declare function denormalize(range: [number, number]): (v: number) => number; declare function normalize(domain: [number, number]): (v: number) => number; interface ICategory { value: string; color?: string; label?: string; } declare type ICategories = readonly ICategory[]; interface ICategoryBin extends Required { count: number; /** * accumulated count */ acc: number; percentage: number; } declare type ICategoryBins = readonly ICategoryBin[]; declare function categoricalHistogram(values: readonly string[], categories: readonly (string | ICategory)[], base?: readonly string[], dark?: boolean): readonly ICategoryBin[]; export { BoxplotStatsOptions, ICategories, ICategory, ICategoryBin, ICategoryBins, QuantilesMethod, boxplot, categoricalHistogram, denormalize, normalize, rand }; //# sourceMappingURL=index.d.ts.map