|
Mantid
|
#include <PeakFunctionIntegrator.h>
Public Member Functions | |
| IntegrationResult | integrate (const IPeakFunction &peakFunction, double lowerLimit, double upperLimit) const |
| Integration of peak function on the interval [a, b]. More... | |
| double | integrateError (const IPeakFunction &peakFunction, double lowerLimit, double upperLimit) const |
| Error in the integrated intensity within an continuous interval due to uncertainties in the values of the fit parameters. More... | |
| IntegrationResult | integrateInfinity (const IPeakFunction &peakFunction) const |
| Integration of peak function on the interval [-Inf, +Inf]. More... | |
| IntegrationResult | integrateNegativeInfinity (const IPeakFunction &peakFunction, double upperLimit) const |
| Integration of peak function on the interval [-Inf, b]. More... | |
| IntegrationResult | integratePositiveInfinity (const IPeakFunction &peakFunction, double lowerLimit) const |
| Integration of peak function on the interval [a, +Inf]. More... | |
| PeakFunctionIntegrator (double requiredRelativePrecision=1e-8) | |
| Constructor with required relative precision argument. More... | |
| double | requiredRelativePrecision () const |
| Returns the currently set precision. More... | |
| void | setRequiredRelativePrecision (double newPrecision) |
| This method sets the desired numerical relative precision that's passed on to the GSL integration-routines. More... | |
| virtual | ~PeakFunctionIntegrator () |
Protected Member Functions | |
| gsl_function | getGSLFunction (const IPeakFunction &peakFunction) const |
| Method that wraps an IPeakFunction for use with GSL functions. More... | |
Protected Attributes | |
| gsl_integration_workspace * | m_integrationWorkspace |
| double | m_relativePrecision |
Definition at line 37 of file PeakFunctionIntegrator.h.
| Mantid::API::PeakFunctionIntegrator::PeakFunctionIntegrator | ( | double | requiredRelativePrecision = 1e-8 | ) |
Constructor with required relative precision argument.
The default is 1e-8. See also PeakFunctionIntegrator::setRequiredRelativePrecision.
| requiredRelativePrecision | :: Desired relative precision of the integral estimations. |
Definition at line 20 of file PeakFunctionIntegrator.cpp.
|
virtual |
Definition at line 29 of file PeakFunctionIntegrator.cpp.
References m_integrationWorkspace.
|
protected |
Method that wraps an IPeakFunction for use with GSL functions.
| peakFunction | :: Peak function to wrap. |
Definition at line 181 of file PeakFunctionIntegrator.cpp.
References Mantid::API::gsl_peak_wrapper().
Referenced by integrate(), integrateInfinity(), integrateNegativeInfinity(), and integratePositiveInfinity().
| IntegrationResult Mantid::API::PeakFunctionIntegrator::integrate | ( | const IPeakFunction & | peakFunction, |
| double | lowerLimit, | ||
| double | upperLimit | ||
| ) | const |
Integration of peak function on the interval [a, b].
Internally, gsl_integration_qags is used for this.
| peakFunction | :: Peak function to integrate. |
| lowerLimit | :: Lower limit of the integration. |
| upperLimit | :: Upper limit of the integration. |
Definition at line 109 of file PeakFunctionIntegrator.cpp.
References Mantid::API::IntegrationResult::error, Mantid::API::IntegrationResult::errorCode, getGSLFunction(), Mantid::API::IntegrationResult::intervals, m_integrationWorkspace, m_relativePrecision, Mantid::API::IntegrationResult::result, and Mantid::API::IntegrationResult::success.
Referenced by Mantid::API::IPeakFunction::integrate(), integrateError(), and Mantid::CurveFitting::Functions::IkedaCarpenterPV::intensity().
| double Mantid::API::PeakFunctionIntegrator::integrateError | ( | const IPeakFunction & | peakFunction, |
| double | lowerLimit, | ||
| double | upperLimit | ||
| ) | const |
Error in the integrated intensity within an continuous interval due to uncertainties in the values of the fit parameters.
if the peak function contains no fit-parameter uncertainties, then the integration error is set to NaN. Also, this function assumes no correlation between the fit parameters, so that their corresponding errors are summed up in quadrature.
| peakFunction | the peak function to integrate |
| lowerLimit | lower limit of the interval over which we integrate |
| upperLimit | upper limit of the interval over which we integrate |
Definition at line 132 of file PeakFunctionIntegrator.cpp.
References Mantid::API::IFunction::clone(), error, Mantid::API::ParamFunction::getError(), Mantid::API::ParamFunction::getParameter(), integrate(), and Mantid::API::ParamFunction::nParams().
Referenced by Mantid::API::IPeakFunction::intensityError().
| IntegrationResult Mantid::API::PeakFunctionIntegrator::integrateInfinity | ( | const IPeakFunction & | peakFunction | ) | const |
Integration of peak function on the interval [-Inf, +Inf].
Internally, gsl_integration_qagi is used for this. The results are returned as IntegrationResult-struct, which contains the approximation of the integral along with other information such as an error estimate (absolute).
| peakFunction | :: Peak function to integrate. |
Definition at line 49 of file PeakFunctionIntegrator.cpp.
References Mantid::API::IntegrationResult::error, Mantid::API::IntegrationResult::errorCode, getGSLFunction(), Mantid::API::IntegrationResult::intervals, m_integrationWorkspace, m_relativePrecision, Mantid::API::IntegrationResult::result, and Mantid::API::IntegrationResult::success.
| IntegrationResult Mantid::API::PeakFunctionIntegrator::integrateNegativeInfinity | ( | const IPeakFunction & | peakFunction, |
| double | upperLimit | ||
| ) | const |
Integration of peak function on the interval [-Inf, b].
Internally, gsl_integration_qagil is used for this.
| peakFunction | :: Peak function to integrate. |
| upperLimit | :: Upper limit of the integration. |
Definition at line 88 of file PeakFunctionIntegrator.cpp.
References Mantid::API::IntegrationResult::error, Mantid::API::IntegrationResult::errorCode, getGSLFunction(), Mantid::API::IntegrationResult::intervals, m_integrationWorkspace, m_relativePrecision, Mantid::API::IntegrationResult::result, and Mantid::API::IntegrationResult::success.
| IntegrationResult Mantid::API::PeakFunctionIntegrator::integratePositiveInfinity | ( | const IPeakFunction & | peakFunction, |
| double | lowerLimit | ||
| ) | const |
Integration of peak function on the interval [a, +Inf].
Internally, gsl_integration_qagiu is used for this.
| peakFunction | :: Peak function to integrate. |
| lowerLimit | :: Lower limit of the integration. |
Definition at line 68 of file PeakFunctionIntegrator.cpp.
References Mantid::API::IntegrationResult::error, Mantid::API::IntegrationResult::errorCode, getGSLFunction(), Mantid::API::IntegrationResult::intervals, m_integrationWorkspace, m_relativePrecision, Mantid::API::IntegrationResult::result, and Mantid::API::IntegrationResult::success.
| double Mantid::API::PeakFunctionIntegrator::requiredRelativePrecision | ( | ) | const |
Returns the currently set precision.
Definition at line 40 of file PeakFunctionIntegrator.cpp.
References m_relativePrecision.
| void Mantid::API::PeakFunctionIntegrator::setRequiredRelativePrecision | ( | double | newPrecision | ) |
This method sets the desired numerical relative precision that's passed on to the GSL integration-routines.
| newPrecision | :: Desired relative precision for integrations. |
Definition at line 36 of file PeakFunctionIntegrator.cpp.
References m_relativePrecision.
|
protected |
Definition at line 54 of file PeakFunctionIntegrator.h.
Referenced by integrate(), integrateInfinity(), integrateNegativeInfinity(), integratePositiveInfinity(), and ~PeakFunctionIntegrator().
|
protected |
Definition at line 56 of file PeakFunctionIntegrator.h.
Referenced by integrate(), integrateInfinity(), integrateNegativeInfinity(), integratePositiveInfinity(), requiredRelativePrecision(), and setRequiredRelativePrecision().