yuki-koyama / mathtoolbox

Mathematical tools (interpolation, dimensionality reduction, optimization, etc.) written in C++11 with Eigen
https://yuki-koyama.github.io/mathtoolbox/
MIT License
257 stars 35 forks source link

Adding z to interpolation #79

Closed journeytosilius closed 1 year ago

journeytosilius commented 1 year ago

Hi, thanks for the lib !

I do this on python and trying to port it to C++ now:

# Interpolate
rbf = scipy.interpolate.Rbf(x, y, z, function='linear')
zi = rbf(xi, yi)

the scipy interpolate function accepts up to four inputs for the interpolation, in my case I'm using x,y and z Is it possible to replicate this with rbf_interpolator.SetData() ?

Thanks

leonleon33156 commented 1 year ago

这是来自QQ邮箱的假期自动回复邮件。您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

yuki-koyama commented 1 year ago

Yes. The method SetData() takes X and y as inputs. The input X is a matrix where each column represents a data point. This can include any number of data points. This is similar to scipy https://docs.scipy.org/doc/scipy/reference/generated/scipy.interpolate.RBFInterpolator.html .