JuliaMath / HCubature.jl

pure-Julia multidimensional h-adaptive integration
Other
153 stars 25 forks source link

Add function hquadrature? #3

Closed xiaoweiz closed 7 years ago

stevengj commented 7 years ago

Okay, added (though you can also call quadgk from the QuadGK package.)

giordano commented 7 years ago

Would make sense to merge QuadGK and HCubature?

stevengj commented 7 years ago

@giordano, I would tend to prefer keeping them separate. The functionality overlaps (and HCubature calls QuadGK to get 1d coefficients/points), but is not quite the same. e.g. QuadGK allows one to compute quadrature rules to any order, but HCubature will probably always be fixed-order (or at best limited to a small set of choices). HCubature requires the integrand to be type stable to gain some extra performance, whereas QuadGK is a less picky....

stevengj commented 7 years ago

Another way of putting it is that the sharing is mostly one-way. HCubature gets 1d quadrature rules from QuadGK, but there is not much code in HCubature that would be useful in QuadGK. (At most a few lines in the hcubature_ function could be shared.)

giordano commented 7 years ago

Point taken, thanks!