Template Class FunctionWrapper

Inheritance Relationships

Base Type

  • public std::unary_function< BinaryFunctionT::second_argument_type, BinaryFunctionT::result_type >

Class Documentation

template<typename BinaryFunctionT>
class FunctionWrapper : public std::unary_function<BinaryFunctionT::second_argument_type, BinaryFunctionT::result_type>

Wrap an integrand in a call to a 1D integrator: romberg()

When romberg2D() is called, it wraps the integrand it was given in a FunctionWrapper functor. This wrapper calls romberg() on the integrand to get a 1D (along the x-coord, for constant y) result . romberg2D() then calls romberg() with the FunctionWrapper functor as an integrand.

Public Functions

FunctionWrapper(BinaryFunctionT func, typename BinaryFunctionT::first_argument_type const x1, typename BinaryFunctionT::first_argument_type const x2, double const eps = 1.0e-6)
BinaryFunctionT::result_type operator()(typename BinaryFunctionT::second_argument_type const y) const