ClampedSplineInterpolation<T>

Models & Types · AiDotNet.Interpolation

Implements clamped cubic spline interpolation for smooth curve fitting with controlled endpoints.

Implements: IInterpolation<T>

How It Works

Clamped cubic splines create smooth curves that pass through all provided data points while allowing you to specify the slope at the endpoints of the curve.

For Beginners: Think of this as drawing a smooth curve through a set of points where you can control the “direction” the curve enters and exits the first and last points. This is useful when you need the curve to approach the endpoints from specific angles, such as when connecting to other curves or when modeling physical phenomena with known behavior at the boundaries.

Unlike other interpolation methods, clamped splines give you control over how the curve behaves at its edges, making them ideal for scenarios where the slope at the endpoints is known or important.

Constructors

Constructor Summary
ClampedSplineInterpolation(Vector<T> x, Vector<T> y, double startSlope, double endSlope, IMatrixDecomposition<T> decomposition) Initializes a new instance of the ClampedSplineInterpolation class.

Methods

Method Summary
T Interpolate(T x) Interpolates a y-value at the specified x-coordinate using clamped cubic spline interpolation.