From: Dan Mcleran (dan.mcleran_at_[hidden])
Date: 2002-10-22 09:18:26


All interested,

How should the interface for numerical integration algorithms behave? I was
thinking of STL-style algorithms like:

area = trapezoidal_integral(vData.begin(),vData.end());

where vData would be a std::vector of f(x) results. The algorithm would then
integrate over this curve and return the area.

I would also propose an interface where the user could provide a container
of parameters to feed into an f(x) that the user would provide. Like this:

area = trapezoidal_integral(vParams.begin(),vParams.end(),Func);

where Func could be either a boost::function, Functor, or function pointer.
The algorithm would call this function for all params and integrate over the
resulting curve.

Any comments?

Regards,

Dan McLeran