import { UniFunction } from "./Utils.ts"; import { BasicInterpolationMethod } from "./BasicInterpolators.ts"; export interface SmoothDiagInfo { robustnessIters: number; secondLastMedianResidual?: number; lastMedianResidual?: number; robustnessWeights?: Float64Array; } export interface LoessInterpolatorDiagInfo extends SmoothDiagInfo { fitYVals: Float64Array; knotFilter: boolean[]; knotXVals: Float64Array; knotYVals: Float64Array; } export interface SmoothParms { xVals: ArrayLike; yVals: ArrayLike; weights?: ArrayLike; bandwidthFraction?: number; robustnessIters?: number; accuracy?: number; outlierDistanceFactor?: number; diagInfo?: SmoothDiagInfo; } export interface LoessInterpolatorParms extends SmoothParms { interpolationMethod?: BasicInterpolationMethod; minXDistance?: number; diagInfo?: LoessInterpolatorDiagInfo; } export declare function createLoessInterpolator(parms: LoessInterpolatorParms): UniFunction; export declare function smooth(parms: SmoothParms): Float64Array; export declare function calculateLocalLinearRegression(xVals: ArrayLike, yVals: ArrayLike, weights: ArrayLike | undefined, x: number, iLeft: number, iRight: number, accuracy: number): number;