Namespaces

Types in MathNet.Numerics.Interpolation

Type CubicSpline

Namespace MathNet.Numerics.Interpolation

Interfaces IInterpolation

Cubic Spline Interpolation.
Supports both differentiation and integration.

Constructors

Static Functions

Methods

Public Constructors

CubicSpline(Double[] x, Double[] c0, Double[] c1, Double[] c2, Double[] c3)

Parameters
Double[] x

sample points (N+1), sorted ascending

Double[] c0

Zero order spline coefficients (N)

Double[] c1

First order spline coefficients (N)

Double[] c2

second order spline coefficients (N)

Double[] c3

third order spline coefficients (N)

Public Static Functions

CubicSpline InterpolateAkima(IEnumerable<double> x, IEnumerable<double> y)

Create an Akima cubic spline interpolation from an unsorted set of (x,y) value pairs. Akima splines are robust to outliers.

CubicSpline InterpolateAkimaInplace(Double[] x, Double[] y)

Create an Akima cubic spline interpolation from an unsorted set of (x,y) value pairs. Akima splines are robust to outliers. WARNING: Works in-place and can thus causes the data array to be reordered.

CubicSpline InterpolateAkimaSorted(Double[] x, Double[] y)

Create an Akima cubic spline interpolation from a set of (x,y) value pairs, sorted ascendingly by x. Akima splines are robust to outliers.

CubicSpline InterpolateBoundaries(IEnumerable<double> x, IEnumerable<double> y, SplineBoundaryCondition leftBoundaryCondition, double leftBoundary, SplineBoundaryCondition rightBoundaryCondition, double rightBoundary)

Create a cubic spline interpolation from an unsorted set of (x,y) value pairs and custom boundary/termination conditions.

CubicSpline InterpolateBoundariesInplace(Double[] x, Double[] y, SplineBoundaryCondition leftBoundaryCondition, double leftBoundary, SplineBoundaryCondition rightBoundaryCondition, double rightBoundary)

Create a cubic spline interpolation from an unsorted set of (x,y) value pairs and custom boundary/termination conditions. WARNING: Works in-place and can thus causes the data array to be reordered.

CubicSpline InterpolateBoundariesSorted(Double[] x, Double[] y, SplineBoundaryCondition leftBoundaryCondition, double leftBoundary, SplineBoundaryCondition rightBoundaryCondition, double rightBoundary)

Create a cubic spline interpolation from a set of (x,y) value pairs, sorted ascendingly by x, and custom boundary/termination conditions.

CubicSpline InterpolateHermite(IEnumerable<double> x, IEnumerable<double> y, IEnumerable<double> firstDerivatives)

Create a hermite cubic spline interpolation from an unsorted set of (x,y) value pairs and their slope (first derivative).

CubicSpline InterpolateHermiteInplace(Double[] x, Double[] y, Double[] firstDerivatives)

Create a hermite cubic spline interpolation from an unsorted set of (x,y) value pairs and their slope (first derivative). WARNING: Works in-place and can thus causes the data array to be reordered.

CubicSpline InterpolateHermiteSorted(Double[] x, Double[] y, Double[] firstDerivatives)

Create a hermite cubic spline interpolation from a set of (x,y) value pairs and their slope (first derivative), sorted ascendingly by x.

CubicSpline InterpolateNatural(IEnumerable<double> x, IEnumerable<double> y)

Create a natural cubic spline interpolation from an unsorted set of (x,y) value pairs and zero second derivatives at the two boundaries.

CubicSpline InterpolateNaturalInplace(Double[] x, Double[] y)

Create a natural cubic spline interpolation from an unsorted set of (x,y) value pairs and zero second derivatives at the two boundaries. WARNING: Works in-place and can thus causes the data array to be reordered.

CubicSpline InterpolateNaturalSorted(Double[] x, Double[] y)

Create a natural cubic spline interpolation from a set of (x,y) value pairs and zero second derivatives at the two boundaries, sorted ascendingly by x.

Public Methods

double Differentiate(double t)

Differentiate at point t.
Parameters
double t

Point t to interpolate at.

Return
double

Interpolated first derivative at point t.

double Differentiate2(double t)

Differentiate twice at point t.
Parameters
double t

Point t to interpolate at.

Return
double

Interpolated second derivative at point t.

bool Equals(object obj)

int GetHashCode()

Type GetType()

double Integrate(double t)

Indefinite integral at point t.
Parameters
double t

Point t to integrate at.

double Integrate(double a, double b)

Definite integral between points a and b.
Parameters
double a

Left bound of the integration interval [a,b].

double b

Right bound of the integration interval [a,b].

double Interpolate(double t)

Interpolate at point t.
Parameters
double t

Point t to interpolate at.

Return
double

Interpolated value x(t).

string ToString()