|
mxlib
c++ tools for analyzing astronomical data and other tasks by Jared R. Males. [git repo]
|
Various tools for integration of functions
Functions | |
| template<typename vectorScT , typename vectorT > | |
| vectorT::value_type | mx::math::radprofIntegral (vectorScT r, vectorT p, bool inczero=false) |
| Calculate the 2D integral given a radial profile. | |
Calculate the 2D integral given a radial profile.
Calculates the integral
\[ 2\pi \int_{min}^{max} p(r) r dr \]
using the Trapezoid rule.
The limits of integration are normally r[0] to r.back() inclusive. If the parameter inczero is set to true, then the region from 0 to r[0] is included, using the value of p[0], where the the integral is there estimate as \( p[0] \pi r[0]^2 \).
| mxException | if the sizes of the input vectors don't match. |
| [in] | p | the r |
Definition at line 62 of file radprofIntegral.hpp.
References mxThrowException, and mx::math::six_fifths().