一组双打的Akima插值

假设我有一个双打数组,使用Akima插值对这个系列进行采样有什么好算法? 将这些数学描述翻译成代码我太愚蠢了。

// values is an array of doubles // idx is the index of the left-hand value for the current interpolation // t is the normalized parameter between values[idx] and values[idx+1] // Don't worry about array bounds, I'll handle that separately. public double InterpolateAkima(double[] values, int idx, double t) { ...? } 

重新发布和扩展我对另一个SO问题的回答,该问题作为该问题的副本而被关闭 – 正如对该问题的评论所暗示的那样。

Akima的原始论文:“一种新的插值方法和基于局部程序的平滑曲线拟合”,ACM 17,14(1970),589-602

http://www.leg.ufpr.br/lib/exe/fetch.php/wiki:internas:biblioteca:akima.pdf

C实现

https://github.com/ampl/gsl/blob/master/interpolation/akima.c

C#实现

https://gist.github.com/dreikanter/3526685

Delphi实现(参见delphi / src / spline3.pas中的BuildAkimaSpline过程)

http://www.alglib.net/translator/re/alglib-2.6.0.delphi.zip

Akima的Fortran 66实现

http://cran.r-project.org/web/packages/akima/

Fortran 90实现

http://miyoshi.googlecode.com/svn-history/r72/trunk/common/common.f90

Java实现

https://commons.apache.org/proper/commons-math/jacoco/org.apache.commons.math3.analysis.interpolation/AkimaSplineInterpolator.java.html

Lisp实现“用于AutoCAD 2d-Polylines”

http://autocad.xarch.at/code/candido/akima.lsp

Matlab实现

http://www.mathworks.se/matlabcentral/fileexchange/1814-akima-interpolation

Pascal实现( 程序描述 )

http://jean-pierre.moreau.pagesperso-orange.fr/Pascal/akima_pas.txt

Python实现

http://www.lfd.uci.edu/~gohlke/code/akima.py.html

VB6实现(参见vb6 / src / spline3.bas中的子程序BuildAkimaSpline)

http://www.alglib.net/translator/re/alglib-2.6.0.vb6.zip

http://www.koders.com/cpp/fid1393B9D668316C1700966643DE0609660B9CB13A.aspx?s=%22Brian+Smith%22

在谷歌代码搜索上获得了一些点击 ,但这不是我非常了解的领域。 Math.NET的第一个结果可能会引起一些兴趣。