HermiteCoef Type

Record fields

Record Field Description

Slopes

Full Usage: Slopes

Field type: vector

First order spline coefficients, slopes at knots

Field type: vector

XValues

Full Usage: XValues

Field type: vector

sample points, sorted ascending

Field type: vector

YValues

Full Usage: YValues

Field type: vector

Zero order spline coefficients, intersects, y values

Field type: vector

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.

x values outside of the xValue range are predicted by straight lines defined by the nearest knot!

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 = 
     CubicSpline.Hermite.interpolate xData yData

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

Static members

Static member Description

HermiteCoef.Create(xValues) (yValues) (slopes)

Full Usage: HermiteCoef.Create(xValues) (yValues) (slopes)

Parameters:
Returns: HermiteCoef
xValues : vector
yValues : vector
slopes : vector
Returns: HermiteCoef