Namespace lsst::afw::math::details¶
-
namespace
details
Functions
-
template<class
T
>
TEpsilon
()
-
template<class
T
>
TMinRep
()
-
template<class
UF
>
boolintGKPNA
(UF const &func, IntRegion<typename UF::result_type> ®, typename UF::result_type const epsabs, typename UF::result_type const epsrel, std::map<typename UF::result_type, typename UF::result_type> *fxmap = 0) Non-adaptive integration of the function f over the region ‘reg’.
- Note
The algorithm computes first a Gaussian quadrature value then successive Kronrod/Patterson extensions to this result. The functions terminates when the difference between successive approximations (rescaled according to rescale_error) is less than either epsabs or epsrel * I, where I is the latest estimate of the integral. The order of the Gauss/Kronron/Patterson scheme is determined by which file is included above. Currently schemes starting with order 1 and order 10 are calculated. There seems to be little practical difference in the integration times using the two schemes, so I haven’t bothered to calculate any more.
-
template<class
UF
>
voidintGKP
(UF const &func, IntRegion<typename UF::result_type> ®, typename UF::result_type const epsabs, typename UF::result_type const epsrel, std::map<typename UF::result_type, typename UF::result_type> *fxmap = 0) An adaptive integration algorithm which computes the integral of f over the region reg.
The area and estimated error are returned as reg.Area() and reg.Err() If desired, *retx and *retf return std::vectors of x,f(x) respectively They only include the evaluations in the non-adaptive pass, so they do not give an accurate estimate of the number of function evaluations.
- Note
First the non-adaptive GKP algorithm is tried. If that is not accurate enough (according to the absolute and relative accuracies, epsabs and epsrel), the region is split in half, and each new region is integrated. The routine continues by successively splitting the subregion which gave the largest absolute error until the integral converges.
-
int
gkp_n
(int level)
Variables
-
const int
NGKPLEVELS
= 5
-
template<class
UF
>
structAuxFunc1
: public std::unary_function<UF::argument_type, UF::result_type> - #include <Integrate.h>
Auxiliary struct 1
-
template<class
T
>
structConstantReg1
: public std::unary_function<T, IntRegion<T>> - #include <Integrate.h>
Helpers for constant regions for int2d, int3d:
-
template<typename
BinaryFunctionT
>
classFunctionWrapper
: public std::unary_function<BinaryFunctionT::second_argument_type, BinaryFunctionT::result_type> - #include <Integrate.h>
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.
-
template<class