## Types in MathNet.Numerics.Interpolation

Type CubicSpline

Namespace MathNet.Numerics.Interpolation

Interfaces IInterpolation

Cubic Spline Interpolation.
Supports both differentiation and integration.

### 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

#### CubicSplineInterpolateAkima(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.

#### CubicSplineInterpolateAkimaInplace(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.

#### CubicSplineInterpolateAkimaSorted(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.

#### CubicSplineInterpolateBoundaries(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.

#### CubicSplineInterpolateBoundariesInplace(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.

#### CubicSplineInterpolateBoundariesSorted(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.

#### CubicSplineInterpolateHermite(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).

#### CubicSplineInterpolateHermiteInplace(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.

#### CubicSplineInterpolateHermiteSorted(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.

#### CubicSplineInterpolateNatural(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.

#### CubicSplineInterpolateNaturalInplace(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.

#### CubicSplineInterpolateNaturalSorted(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.

#### CubicSplineInterpolatePchip(IEnumerable<double> x, IEnumerable<double> y)

Create a piecewise cubic Hermite interpolating polynomial from an unsorted set of (x,y) value pairs. Monotone-preserving interpolation with continuous first derivative.

#### CubicSplineInterpolatePchipInplace(Double[] x, Double[] y)

Create a piecewise cubic Hermite interpolating polynomial from an unsorted set of (x,y) value pairs. Monotone-preserving interpolation with continuous first derivative. WARNING: Works in-place and can thus causes the data array to be reordered.

#### CubicSplineInterpolatePchipSorted(Double[] x, Double[] y)

Create a piecewise cubic Hermite interpolating polynomial from an unsorted set of (x,y) value pairs. Monotone-preserving interpolation with continuous first derivative.

### Public Methods

#### doubleDifferentiate(double t)

Differentiate at point t.
##### Parameters
###### `double` t

Point t to interpolate at.

##### Return
###### `double`

Interpolated first derivative at point t.

#### doubleDifferentiate2(double t)

Differentiate twice at point t.
##### Parameters
###### `double` t

Point t to interpolate at.

##### Return
###### `double`

Interpolated second derivative at point t.

#### Tuple<double, double>Extrema()

Returns the t values in the domain of the spline for which it takes the minimum and maximum value.
##### Return
###### `Tuple<double, double>`

A tuple containing the t value for which the spline is minimum in the first component and maximum in the second component

#### doubleIntegrate(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].

#### doubleIntegrate(double t)

Indefinite integral at point t.
##### Parameters
###### `double` t

Point t to integrate at.

#### doubleInterpolate(double t)

Interpolate at point t.
##### Parameters
###### `double` t

Point t to interpolate at.

##### Return
###### `double`

Interpolated value x(t).

#### Double[]StationaryPoints()

Gets all the t values where the derivative is 0 see: https://mathworld.wolfram.com/StationaryPoint.html
##### Return
###### `Double[]`

An array of t values (in the domain of the function) where the derivative of the spline is 0