假设我有一个双打数组,使用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)
{
...?
}