import type { DataXY, DoubleArray, FromTo, NumberArray } from 'cheminfo-types'; interface InternalZone { from: number; to: number; fromIndex: number; toIndex: number; nbPoints: number; } export interface XYReduceOptions { /** * @default x[0] */ from?: number; /** * @default x[x.length-1] */ to?: number; /** * Number of points * @default 4001 */ nbPoints?: number; /** * If optimize we may have less than nbPoints at the end. It should not have visible effects * @default false */ optimize?: boolean; /** * Array of zones to keep (from/to object) * @default [] */ zones?: FromTo[]; } /** * Reduce the number of points while keeping visually the same noise. Practical to * display many spectra as SVG. If you want a similar looking spectrum you should still however * generate at least 4x the nbPoints that is being displayed. * * SHOULD NOT BE USED FOR DATA PROCESSING !!! * You should rather use ml-xy-equally-spaced to make further processing * @param data - Object that contains property x (an ordered increasing array) and y (an array) * @param options - options * @returns Object with x and y arrays */ export declare function xyReduce(data: DataXY, options?: XYReduceOptions): DataXY; export declare function notEnoughPoints(x: NumberArray, y: NumberArray, internalZones: InternalZone[], totalPoints: number): { x: Float64Array; y: Float64Array; }; export declare function getInternalZones(zones: FromTo[], x: NumberArray): { internalZones: InternalZone[]; totalPoints: number; }; export {}; //# sourceMappingURL=xyReduce.d.ts.map