10

double の配列があると仮定すると、 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)
{
  ...?
}
4

2 に答える 2

28

この質問の複製として閉じられた別のSOの質問に対する私の回答を再投稿して拡張します-その質問に対するコメントで示唆されています。

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 2d ポリライン用」の Lisp 実装

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

于 2011-01-09T05:46:31.850 に答える
7

Googleコード検索でいくつかヒットしましたが、これは私がよく知っている分野ではありません. 最初の結果はMath.NETのもので、興味深いかもしれません。

于 2010-09-04T01:54:55.097 に答える