SubSplineCoef Type

Subsplines differ from regular splines because they are discontinuous in the second derivative.

Record fields

Record Field Description

C0

Full Usage: C0

Field type: float[]

Zero order spline coefficients (N)

Field type: float[]

C1

Full Usage: C1

Field type: float[]

First order spline coefficients (N)

Field type: float[]

C2

Full Usage: C2

Field type: float[]

Second order spline coefficients (N)

Field type: float[]

C3

Full Usage: C3

Field type: float[]

Third order spline coefficients (N)

Field type: float[]

XValues

Full Usage: XValues

Field type: float[]

sample points (N+1), sorted ascending

Field type: float[]

Instance members

Instance member Description

this.Predict

Full Usage: this.Predict

Returns: float -> float Function that takes an x value and returns function value.

Returns function that takes x value and predicts the corresponding interpolating y value.

Second derivative (curvature) is NOT continuous at knots to allow higher flexibility to reduce oscillations! For reference see: http://www.dorn.org/uni/sls/kap06/f08_0204.htm.

Returns: float -> float

Function that takes an x value and returns function value.

Example

 
 // e.g. days since a certain event
 let xData = vector [|0.;1.;5.;4.;3.;|]
 // some measured feature
 let yData = vector [|1.;5.;4.;13.;17.|]

 // get coefficients for piecewise interpolating cubic polynomials
 let coefficients = 
     Akima.interpolate xData yData

 // get function value at x=3.4
 coefficients.Predict 3.4

Static members

Static member Description

SubSplineCoef.Create(xValues) (c0) (c1) (c2) (c3)

Full Usage: SubSplineCoef.Create(xValues) (c0) (c1) (c2) (c3)

Parameters:
    xValues : float[]
    c0 : float[]
    c1 : float[]
    c2 : float[]
    c3 : float[]

Returns: SubSplineCoef
xValues : float[]
c0 : float[]
c1 : float[]
c2 : float[]
c3 : float[]
Returns: SubSplineCoef