import type { NumberArray } from 'cheminfo-types'; export interface XBinningOptions { /** * Number of consecutive points to average per bin. Must be a positive integer. * Ignored when `numberOfPoints` is provided. * @default 10 */ binSize?: number; /** * Target number of points in the output. When provided, the input is split * into `numberOfPoints` contiguous bins of as-equal-as-possible size, and * takes precedence over `binSize`. Must be a positive integer and * `<= array.length`. */ numberOfPoints?: number; /** * If `true`, the first and last points of the input are preserved unchanged * in the output (useful to keep the exact domain endpoints of a spectrum). * The intermediate points (indices `1` to `length - 2`) are binned. * @default true */ keepFirstAndLast?: boolean; } /** * Downsample an array by averaging consecutive non-overlapping points (binning). * Either specify a fixed `binSize` or a target `numberOfPoints`. * @param array - Input array. * @param options - Options. * @returns Downsampled array. */ export declare function xBinning(array: NumberArray, options?: XBinningOptions): Float64Array; //# sourceMappingURL=xBinning.d.ts.map