Boost中的c ++ Hermite插值算法 [英] c++ Hermite interpolation algorithm in Boost

查看:302
本文介绍了Boost中的c ++ Hermite插值算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用Boost c ++库进行Hermite插值,但是没有充分的文档记录,我也不了解.

I'm trying to use Boost c++ library for Hermite interpolation, but it's not well documented and I'm not well understand.

我的情况是从以下数据点计算x位置的y值:

My case is to calculate y values at some x position from data points such as:

X: 0.9, 1.7, 2.55, 3.39...
Y: 0.9, 0.8, 0.85, 0.84...

并获得相等的x间隔(x间隔0.5)的结果:

And get result with equal x spaces (x space 0.5):

X: 0.5, 1.00, 1.5, 2.00, 2.5, 3.0,...
Y: 0.8, 0.95, 0.8, 0.85, 0.9, 0.9,...

提升对我有帮助吗?我在Web中找到了Hermite的更多实现,但是示例和结果输出不是我想要的.我认为那是因为我不了解它是如何工作的.当我读到Hermite时,我坚信该算法应该询问一些点,间距值以及可能很少的其他输入值,然后计算并返回新的点,但是我错了,现在迷路了.

Can boost be helpful for me? I had found more implementations of Hermite in web, but examples and it's result output was not what I'm looking for. I think thats because I don't understand how it works. When I read about Hermite I tought that algorithm should ask for some points, spacing value and might few other input values and then calculate and return new points, but I was wrong and now lost..

http://www.boost.org/doc/libs/1_47_0/libs/math/doc/sf_and_dist/html/math_toolkit/special/sf_poly/hermite.html

也许有人有使用Hermite的经验并且有类似的案例?

Maybe someone has experience using Hermite and had similar case?

推荐答案

首先,Hermite是一位多产的数学家,所以 Hermite多项式(正交族)与

Well, first of all, Hermite was a prolific mathematician, so Hermite polynomials (an orthogonal family) are unrelated to Hermite interpolating polynomials that arise in the interpolation method.

第二,当您具有前几个函数导数的值以及每个点的函数值时,将应用Hermite内插法,因此它不适用于您的情况.

Second, Hermite interpolation is applied when you have values of first few function derivatives as well as function values at each point, so it's not really applicable in your case.

在Boost中,我只能找到用于非均匀插值的以下算法:

In Boost specifically, I could find only this algorithm for non-uniform interpolation: http://www.boost.org/doc/libs/1_65_0/libs/math/doc/html/math_toolkit/interpolate/barycentric.html —hopefully it is good enough for your purposes.

这篇关于Boost中的c ++ Hermite插值算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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