mathnet-numerics
mathnet-numerics copied to clipboard
SplineBoundaryCondition.NotAKnot or CubicSpline.InterpolateNotAKnot
I'm porting some IMSL-based Fortran code to C#, including some calls to CSIEZ, which does cubic spline interpolation using the "not-a-knot" condition. I'm not terribly knowledgeable about splines, so I found this nice page that gives a concise visual and mathematical comparison of several boundary conditions, including "natural" and "not-a-knot".
For right now, CubicSpline's natural method seems like it might be close enough, closer anyway than Akima or parabolically terminated boundaries for my particular inputs.
You need to add the calculation of the left and right boundary of NotAKnot condition to CubicSpline.cs
See scipy implementation as a reference.
Now in the MathNet.Numerics.Interpolation.CubicSpline,only implements the boundary-condition-type of 'natural', don't implements the boundary-condition-type of 'not-a-knot'.But, in other software, such as Python scipy.interpolate.CubicSpline or MATLAB spline(), the default boundary-condition-type is 'not-a-knot'. Are there any plans to implement the 'not-a-knot' type?
I have the same problem, how do you solve this at last?