Boost logo

Boost Users :

From: pbristow_at_[hidden]
Date: 2020-08-16 10:24:48


 

 

From: Boost-users <boost-users-bounces_at_[hidden]> On Behalf Of Anirban Pal via Boost-users
Sent: 14 August 2020 22:57
To: boost-users_at_[hidden]
Cc: Anirban Pal <anirban.pal.iitkgp_at_[hidden]>
Subject: [Boost-users] Integrate function with arguments using quadrature

 

Hello,

 

I'm trying to integrate functions with BOOST quadrature routines. So far they have been extremely impressive accuracy-wise, particularly with multiprecision features.

 

I wish to integrate a function and pass some arguments to it. These arguments can be scalars, matrices, structs or objects. I was wondering if there is an example that explores this. Would I need to use a boost.function? Or would a function pointer work?

 

I currently have an implementation using GSL_functions which explicitly allow the function and parameters to be passed as pointers. I am curious if I can do something similar with boost.

 

I suspect so.

 

Are these example any help to you?

 

https://www.boost.org/doc/libs/1_74_0/libs/math/example/ooura_fourier_integrals_cosine_example.cpp

 

 

https://www.boost.org/doc/libs/1_74_0/libs/math/example/ooura_fourier_integrals_example.cpp

 

 

https://www.boost.org/doc/libs/1_74_0/libs/math/example/ooura_fourier_integrals_multiprecision_example.cpp

 

HTH

 

Paul

 

 



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net