双打的数组的阿克玛插值 [英] Akima interpolation of an array of doubles

查看:255
本文介绍了双打的数组的阿克玛插值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我已经双打的数组,什么是好的算法使用阿克玛插值的?我太傻把这种数学描述成代码。

  //值是双打
阵列/ / 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 =htt​​ps://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 =htt​​p://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实现



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



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

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

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆