in

.NET Opensource

Community for opensource projects by Christoph Rüegg

Spline interpolation roadmap

Last post 05-22-2008 14:28 by Christoph Rüegg. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 05-21-2008 13:57

    Spline interpolation roadmap

    Hi 

    I've downloaded the latest from svn and I'm playing around with the new interpolation functionality. I'm finding it pretty easy to use and was just wondering what the planned features are. One feature which is of interest to me is the "not-a-knot" boundary condition for splines.

    Keep up the great work! 

  • 05-21-2008 18:16 In reply to

    Re: Spline interpolation roadmap

    The Interpolation.CreateNaturalCubicSpline method takes a IList<double> as argument. Vector does not have an implicit cast to IList.

    Therefore I need to write:

    Interpolation.CreateNaturalCubicSpline(((double[)x).ToList(), ((double[)y).ToList());

    instead of:

    Interpolation.CreateNaturalCubicSpline(x, y); 

    I quickly tried to add an implicit cast to Vector, but VS gave me the following error:

    Error    1    'MathNet.Numerics.LinearAlgebra.Vector.implicit operator System.Collections.Generic.IList<double>(MathNet.Numerics.LinearAlgebra.Vector)': user-defined conversions to or from an interface are not allowed    C:\Documents and Settings\czietsman\My Documents\Visual Studio 2008\Math.Net\src\app\MathNet.Iridium\Library\LinearAlgebra\Vector.cs    315    23    Iridium

    Is there a reason why CreateNaturalCubicSpline takes an IList as argument instead of a vector or double[?

  • 05-21-2008 18:51 In reply to

    Re: Spline interpolation roadmap

    Answer

    Thanks for the feedback. I will add a new feature to the tracker for the not-a-knot boundary condition. Beside that there's no detailed interpolation roadmap yet, but I intend to provide additional complex & trigonometric interpolation methods in medium-term.

    I decided to use IList<double> because it is the smallest common feature unit we need and because it's directly supported by the two most important structures, double[ ] and List<double>. Btw, there's no need to call "ToList()", simply casting to double[ ] will do the trick.

    I think the best solution for vectors would be to make Vector implement IList<double>, too.

  • 05-22-2008 14:28 In reply to

    Re: Spline interpolation roadmap

    The two issues are now tracked as IRID-145 and IRID-146.

Page 1 of 1 (4 items)
Powered by Community Server (Non-Commercial Edition), by Telligent Systems