Class InterpolatorSpline

Cubic spline interpolation, with "natural" boundary conditions (see docs for R's ?spline). Compared with the other interpolation objects (InterpolatorConstant and InterpolatorLinear) here we have to do some set up after initialisation to prepare the coefficients of the system. The actual interpolation via eval is not much complex than linear interepolation though.

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

_i: number
_x: readonly number[]
_y: readonly number[][]
nX: number

Number of 'x' points in the system

nY: number

Number of series per 'x'

Methods

  • eval(x: number, series?: number): number
  • Evaluate the interpolation function

    Parameters

    • x: number

      The x position to interpolate the function at

    • series: number = 0

    Returns number

  • evalAll(x: number): number[]
  • Evaluate the interpolation function on all traces

    Parameters

    • x: number

      The x position to interpolate the function at

    Returns number[]

  • search(target: number, allowRight: boolean): number

Generated using TypeDoc