c# - double 组的 Akima 插值

标签 c# interpolation spline

假设我有一个 double 组,使用 Akima interpolation 对这个系列进行采样的好算法是什么? ?我太笨了,无法将数学描述转化为代码。

// 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)
{
  ...?
}

最佳答案

转发和扩展我对 another SO question 的回答这是作为这个问题的重复而关闭的 - 正如对该问题的评论所建议的那样。

Akima 的原始论文: ``一种新的基于局部过程的插值和平滑曲线拟合方法'', Journal of ACM 17, 4 (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

“用于 AutoCAD 二维多段线”的 Lisp 实现

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

Matlab 实现

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

Pascal 实现(program description)

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

关于c# - double 组的 Akima 插值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3502769/

相关文章:

javascript - 从 Blazor 中由 Javascript DotNet.invokeMethodAsync 调用的静态方法调用 C# 非静态方法

colors - icCube - 基于最小值和最大值插值 RGBColors?

python - 如何最好地对 2D 点数据执行曲面积分?

line - 样条曲线和直线之间的交点

python - 在 Python 回归样条中选择节点

c# - MVC + EntityFramework + 字段验证

c# - 如何使用 AutoMapper 将构造函数参数传递给隐式字典映射?

c++ - 平滑步函数

autocad - 如何使用拟合点创建 dxf 样条曲线?

c# - WPF 全局化(也许不是)