Re: [Boost-users] Integrate function with arguments using quadrature

2020-08-20 Thread Anirban Pal via Boost-users
Thank you John and Kila. On Thu, 20 Aug 2020 at 00:42, kila suelika via Boost-users < boost-users@lists.boost.org> wrote: > In you lambda expression, you have to capture B_local : > > auto f = [&](Real x) { return std::bind(f0, _1, B_local)(x); }; > > The *[&]* tells the compiler to capture v

Re: [Boost-users] Integrate function with arguments using quadrature

2020-08-19 Thread kila suelika via Boost-users
In you lambda expression, you have to capture B_local : auto f = [&](Real x) { return std::bind(f0, _1, B_local)(x); }; The *[&]* tells the compiler to capture variables by reference automatically. On Mon, Aug 17, 2020 at 2:26 AM Anirban Pal via Boost-users < boost-users@lists.boost.org> wro

Re: [Boost-users] Integrate function with arguments using quadrature

2020-08-16 Thread Anirban Pal via Boost-users
Thank you John and Paul for your responses. Allow me to be more clear. I’m considering something like the following function *f0*, which depends on *x* and some additional arguments given by the vector *A*. The vector *A *is unknown at compile time and computed during execution. The function f0 is

Re: [Boost-users] Integrate function with arguments using quadrature

2020-08-16 Thread John Maddock via Boost-users
On 14/08/2020 22:56, Anirban Pal via Boost-users wrote: 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.

Re: [Boost-users] Integrate function with arguments using quadrature

2020-08-16 Thread Paul A. Bristow via Boost-users
From: Boost-users On Behalf Of Anirban Pal via Boost-users Sent: 14 August 2020 22:57 To: boost-users@lists.boost.org Cc: Anirban Pal Subject: [Boost-users] Integrate function with arguments using quadrature Hello, I'm trying to integrate functions with BOOST quadrature rou

[Boost-users] Integrate function with arguments using quadrature

2020-08-14 Thread Anirban Pal via Boost-users
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.