1

I want to find the maximum curvature point of a cubic spline using MathNet.

I know the math behind it and I know how to do it with python - but the current project I'm working on is under .NET. I turned to MathNet for that but I'm not sure I have the right mindset to do that:

Basically my flow is something like this (please note not actual code - but what I want to do with MathNet)

var x = { 1, 2, 3, 4, 5, 6} 
var y = { 3, 4, 1, 3, 4, 3}

var cubicSplineFunction = InterpolateCubicSpline(x,y);
var inverseCubicSplineFunction = InterpolateCubicSpline(x,-y);

var xMax = MinimiumOfaFunction(inverseCubicSplineFunction);
var yMax = cubicSplineFunction(xMax);

I found the Cubic Spline in the Interpolate API but have no idea how to find the minimum of that function.

Can I do something like this with MathNet ?

miculnegru
  • 11
  • 3
  • What type is `inverseCubicSplineFunction`? Is it an array of ints? – FortyTwo May 24 '17 at 11:43
  • I'm looking for the actual code.. what I wrote is not actual code... it is what I would need from the library to do. The return type in that case should be a mathematical function. – miculnegru May 24 '17 at 14:19
  • The problem is that MathNet only has functions for differentiating at certain points on the spline and doesn't return the roots for the whole function and its derivatives. You can try finding local minima with this library using something like gradient descent, but this would be terribly slow. – eheller Jun 09 '21 at 16:19

0 Answers0