kbarbary / Dierckx.jl

Julia package for 1-d and 2-d splines
Other
157 stars 30 forks source link

Integrate Spline2D along 1 dimension #49

Closed lssimoes closed 6 years ago

lssimoes commented 6 years ago

Hi,

I'd like to perform a 1D integral over a Spline2D object (and possibly retain a Spline1D object) but couldn't find this in the documentation nor could I devise a way to do it myself..

Is there any for that already?

Thanks!

kbarbary commented 6 years ago

I'm pretty sure this is not in the Fortran library. You could evaluate the spline on a 2d grid, use those points to create a series of 1d splines along the dimension you want to integrate, integrate each spline, then create a new 1d spline from the results.

lssimoes commented 6 years ago

I see. Thanks