`CubicSplines.CubicSpline`

— TypeConstruct an Akima spline according to [1]. In addition to the original method, this implementation also allows for customized extrapolation at both spline sides. The extrapolation behaviour is defined by the coefficients of a 3rd degree polynomial which can be given as additional keyword arguments extrapl and extrapr to the constructor. extrapl and/or extrapr should be either "nothing" or a set of coefficients.

**Case 1: Extrapolation is set to "nothing"**

In this case, the default quadratic extrapolation according to section 2.3 of [1] is used to construct the spline and the spline throws an error when evaluated outside its boundaries.

**Case 2: Extrapolation is set to a vector**

The container is given as a n-element collection of values: extrapl = [p1, p2, p3, ..., pn] which are used to evaluate the following function: y = p0 + p1*(x-x3) + p2*(x-x3)^2 + p3*(x-x3)^3 + ... + pn*(x-x3)^n The constant p0 is equal to y3 by definition (continuous spline). x3 and y3 are the first/last datapoint values respectively.

`CubicSplines._binary_search_interval`

— MethodBinary search to find the interval which contains a given number. The interval is given as a sorted array of real numbers. Each neighbouring pair is interpreted as an interval. The function returns the lower index of the interval containing the given number.

If the returned index is 0, the number is located in the interval (-Inf, array[1]) If the returned index is length(array), the number is located in the interval [array[end], Inf)

`CubicSplines._diffpoly`

— FunctionCalculate the coefficients for the differentiated polygon

`CubicSplines.gradient`

— MethodGeneralized gradient of degree n at a given point x

`CubicSplines.gradient`

— MethodEvaluate the spline gradient of degree one at a given point x