双打的数组的阿克玛插值 [英] Akima interpolation of an array of doubles
问题描述
假设我已经双打的数组,什么是好的算法使用阿克玛插值的?我太傻把这种数学描述成代码。
//值是双打
阵列/ / IDX是当前插补
// t时左手值的指数值[IDX]和值之间的标准化参数[IDX + 1]
//不要担心数组界限,我会分开处理的。
公共双InterpolateAkima(双[]值,INT IDX,双T)
{
...?
}
这是我的回答转播和扩张到另一SO问题已关闭,因为这问题的一个副本 - 通过对这个问题的注释的建议
阿克玛的原始纸:
``插补和平滑曲线的新方法拟合基于本地程序',期刊ACM 17,4(1970 ),589-602。
http://www.leg.ufpr.br/lib/exe/fetch.php/wiki:internas:biblioteca:akima.pdf
C实现
https://github.com/幅度/ GSL / BLOB /主/插/ akima.c
C#实现
< A HREF =https://github.com/mathnet/mathnet-numerics/blob/master/src/Numerics/Interpolation/Algorithms/AkimaSplineInterpolation.cs相对=nofollow> https://gist.github.com/ dreikanter / 3526685
Delphi实现(见德尔福/ src目录/ spline3.pas程序BuildAkimaSpline)
http://www.alglib.net/translator/re /alglib-2.6.0.delphi.zip
阿克玛公司的Fortran 66的实施
<一个HREF =http://cran.r-project.org/web/packages/akima/相对=nofollow> http://cran.r-project.org/web/packages/akima/
Fortran 90的实施
的 http://miyoshi.googlecode.com/svn-history/r72/trunk/common/common.f90
Java实现
Lisp实现为AutoCAD二维多段线
http://autocad.xarch.at /code/candido/akima.lsp
matlab实现
的 http://www.mathworks.se/matlabcentral/fileexchange/1814-akima-interpolation
帕斯卡实现(程序说明)
的 http://jean-pierre.moreau.pagesperso-orange.fr/Pascal/akima_pas.txt
Python实现
HTTP:// WWW .lfd.uci.edu /〜gohlke /代码/ 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+史密斯%22
Assuming I have an array of doubles, what's a good algorithm to sample this series using Akima interpolation? I'm too stupid to translate that mathematical description into code.
// 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)
{
...?
}
Repost and expansion on my answer to another SO question that was closed as a duplicate of this question - as suggested by a comment on that question.
Akima's original paper: ``A new method of interpolation and smooth curve fitting based on local procedures'', Journal of ACM 17, 4 (1970), 589-602
http://www.leg.ufpr.br/lib/exe/fetch.php/wiki:internas:biblioteca:akima.pdf
C implementation
https://github.com/ampl/gsl/blob/master/interpolation/akima.c
C# implementation
https://gist.github.com/dreikanter/3526685
Delphi implementation (see procedure BuildAkimaSpline in delphi/src/spline3.pas)
http://www.alglib.net/translator/re/alglib-2.6.0.delphi.zip
Akima's Fortran 66 implementation
http://cran.r-project.org/web/packages/akima/
Fortran 90 implementation
http://miyoshi.googlecode.com/svn-history/r72/trunk/common/common.f90
Java implementation
Lisp implementation "for AutoCAD 2d-Polylines"
http://autocad.xarch.at/code/candido/akima.lsp
Matlab implementation
http://www.mathworks.se/matlabcentral/fileexchange/1814-akima-interpolation
Pascal implementation (program description)
http://jean-pierre.moreau.pagesperso-orange.fr/Pascal/akima_pas.txt
Python implementation
http://www.lfd.uci.edu/~gohlke/code/akima.py.html
VB6 implementation (see subroutine BuildAkimaSpline in vb6/src/spline3.bas)
http://www.alglib.net/translator/re/alglib-2.6.0.vb6.zip
http://www.koders.com/cpp/fid1393B9D668316C1700966643DE0609660B9CB13A.aspx?s=%22Brian+Smith%22
这篇关于双打的数组的阿克玛插值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!