Double numerical integration in C ++

I'm looking for a good way to calculate double integral using pre-written C ++ libraries. The main integral I'm dealing with is this:

<code> \ int_ {b} ^ {c} \ int_ {a} ^ {f (y)} f (x, y) dx dy </code>
      <br>
        <script async src=
" data-src="/img/247f0e072dcb1504027c331d518cc492.gif" class=" lazyloaded" src="https://fooobar.com//img/247f0e072dcb1504027c331d518cc492.gif">

I did some research and found several libraries that might be useful, however I'm not sure which one to pick based on the problem I'm dealing with. The libraries I have looked at are

  • GSL - The problem here is written in C, so I'll have to find some kind of wrapper to make it compatible with my code research.
  • Cuba. This library seems to be very suitable and well documented. However, I would like to avoid importing a completely new library if I may, because I already import Boost and Blitz and would like to feel free to compile everything to a minimum.
  • Boost - From what I read in my Boost documentation, ODE integration methods, but I couldn't find any libraries for numerically integrating double integrals of functions. Am I missing something? This would be the most convenient option as I already use Boost in my codes and its already in C ++.

So my question essentially boils down to this:

Which of these three libraries would be most useful for my purposes? Is it possible to hold the integral I specified with Boost? Also, any advice on how to implement this integral using any of the above libraries would be greatly appreciated.

+3


source to share


1 answer


Take a look at these sources, calling c code from C ++ is usually not problematic. This will be another direction that may be.

How to mix C and C ++



How to call a C function in C ++, C ++ Function in C (Mix C and C ++)

0


source







All Articles