|
Boost : |
From: Neal Becker (ndbecker2_at_[hidden])
Date: 2006-12-07 10:22:52
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 thought about having the integrator type (romberg, trap, etc) be specified as the
1st template parameter, but offhand I don't see what value that adds. Any thoughts?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk