Boost logo

Boost :

From: Franck Stauffer (franck_at_[hidden])
Date: 2006-12-07 10:52:57


On Dec 7, 2006, at 4:22 PM, Neal Becker wrote:

> Starting with basics. Here is my idea for a family of 1-d
> integrators:
>
> template<typename func_t>
> struct arg {
> typedef typename func_t::arg_t type;
> };
>
> template<typename func_t>
> struct ret {
> typedef typename func_t::ret_t type;
> };
>
> template<typename func_t, typename arg_t=typename
> arg<func_t>::type, typename ret_t=typename ret<func_t>::type>
> struct trap_1d {
> ret_t operator() (arg_t lower, arg_t upper);
> };
>

I have neither real objections on the template parameters, nor on
making the integrator a functor. But I just have one simple question:
what should trap_1d::operator() return? succesive refinements of the
integral when called multiple times?


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk