UNPKG

frame.akima

Version:

A package for Akima interpolation

36 lines 1.4 kB
/** * Evaluates the polynomial of the segment corresponding to the specified x value. * @param xVals * @param segmentCoeffs * @param x * @returns */ export declare function evaluatePolySegment(xVals: ArrayLike<number>, segmentCoeffs: ArrayLike<number>[], x: number): number; /** * Corresponds to java.util.Arrays.binarySearch(). * The insertion point is defined as the point at which the key would be inserted into the array: the index of the first element greater than * the key, or a.length if all elements in the array are less than the specified key. * @param a * @param key * @returns the index of the search key, if it is contained in the array. Otherwise it returns -(insertionPoint + 1) */ export declare function binarySearch(a: ArrayLike<number>, key: number): number; /** * Evaluates the value of a polynomial. * @param c contains the polynomial coefficients in ascending order. * @param x * @returns */ export declare function evaluatePoly(c: ArrayLike<number>, x: number): number; /** * Checks that a number sequence is strictly increasing and all values are finite. * @param a */ export declare function checkStrictlyIncreasing(a: ArrayLike<number>): void; /** * Trims top order polynomial coefficients which are zero. * @param c * @returns */ export declare function trimPoly(c: Float64Array): Float64Array; //# sourceMappingURL=interpolation-utils.d.ts.map