LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Public Member Functions | Private Attributes | List of all members
lsst::afw::math::details::FunctionWrapper< BinaryFunctionT > Class Template Reference

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

#include <Integrate.h>

Inheritance diagram for lsst::afw::math::details::FunctionWrapper< BinaryFunctionT >:

Public Member 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
 

Private Attributes

BinaryFunctionT _func
 
BinaryFunctionT::first_argument_type _x1
 
BinaryFunctionT::first_argument_type _x2
 
double _eps
 

Detailed Description

template<typename BinaryFunctionT>
class lsst::afw::math::details::FunctionWrapper< BinaryFunctionT >

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.

Author
S. Bickerton (adapted from RHL's SDSS C code)

Definition at line 946 of file Integrate.h.

Constructor & Destructor Documentation

template<typename BinaryFunctionT >
lsst::afw::math::details::FunctionWrapper< BinaryFunctionT >::FunctionWrapper ( BinaryFunctionT  func,
typename BinaryFunctionT::first_argument_type const  x1,
typename BinaryFunctionT::first_argument_type const  x2,
double const  eps = 1.0e-6 
)
inline

Definition at line 950 of file Integrate.h.

953  :
954  _func(func), _x1(x1), _x2(x2), _eps(eps) {}
BinaryFunctionT::first_argument_type _x1
Definition: Integrate.h:961
BinaryFunctionT::first_argument_type _x2
Definition: Integrate.h:961

Member Function Documentation

template<typename BinaryFunctionT >
BinaryFunctionT::result_type lsst::afw::math::details::FunctionWrapper< BinaryFunctionT >::operator() ( typename BinaryFunctionT::second_argument_type const  y) const
inline

Definition at line 955 of file Integrate.h.

956  {
957  return integrate(std::bind2nd(_func, y), _x1, _x2, _eps);
958  }
int y
BinaryFunctionT::first_argument_type _x1
Definition: Integrate.h:961
BinaryFunctionT::first_argument_type _x2
Definition: Integrate.h:961
UnaryFunctionT::result_type integrate(UnaryFunctionT func, typename UnaryFunctionT::argument_type const a, typename UnaryFunctionT::argument_type const b, double eps=1.0e-6)
The 1D integrator.
Definition: Integrate.h:917

Member Data Documentation

template<typename BinaryFunctionT >
double lsst::afw::math::details::FunctionWrapper< BinaryFunctionT >::_eps
private

Definition at line 962 of file Integrate.h.

template<typename BinaryFunctionT >
BinaryFunctionT lsst::afw::math::details::FunctionWrapper< BinaryFunctionT >::_func
private

Definition at line 960 of file Integrate.h.

template<typename BinaryFunctionT >
BinaryFunctionT::first_argument_type lsst::afw::math::details::FunctionWrapper< BinaryFunctionT >::_x1
private

Definition at line 961 of file Integrate.h.

template<typename BinaryFunctionT >
BinaryFunctionT::first_argument_type lsst::afw::math::details::FunctionWrapper< BinaryFunctionT >::_x2
private

Definition at line 961 of file Integrate.h.


The documentation for this class was generated from the following file: