Mantid
|
An implementation of SeqDomain for parallel cost function and derivatives computation. More...
#include <ParDomain.h>
Public Member Functions | |
void | additiveCostFunctionVal (const CostFunctions::CostFuncFitting &costFunction) override |
Calculate the value of an additive cost function. More... | |
void | additiveCostFunctionValDerivHessian (const CostFunctions::CostFuncFitting &costFunction, bool evalDeriv, bool evalHessian) override |
Calculate the value, first and second derivatives of an additive cost function. More... | |
void | getDomainAndValues (size_t i, API::FunctionDomain_sptr &domain, API::FunctionValues_sptr &values) const override |
Create and return i-th domain and i-th values, (i-1)th domain is released. More... | |
ParDomain () | |
Public Member Functions inherited from Mantid::CurveFitting::SeqDomain | |
void | addCreator (const API::IDomainCreator_sptr &creator) |
Add new domain creator. More... | |
virtual void | additiveCostFunctionVal (const CostFunctions::CostFuncFitting &costFunction) |
Calculate the value of an additive cost function. More... | |
virtual void | additiveCostFunctionValDerivHessian (const CostFunctions::CostFuncFitting &costFunction, bool evalDeriv, bool evalHessian) |
Calculate the value, first and second derivatives of an additive cost function. More... | |
virtual void | getDomainAndValues (size_t i, API::FunctionDomain_sptr &domain, API::FunctionValues_sptr &values) const |
Create and return i-th domain and i-th values, (i-1)th domain is released. More... | |
virtual size_t | getNDomains () const |
Return the number of parts in the domain. More... | |
void | rwpVal (const CostFunctions::CostFuncRwp &rwp) |
Calculate the value of a Rwp cost function. More... | |
void | rwpValDerivHessian (const CostFunctions::CostFuncRwp &rwp, bool evalDeriv, bool evalHessian) |
Calculate the value, first and second derivatives of a RWP cost function. More... | |
SeqDomain () | |
size_t | size () const override |
Return the number of points in the domain. More... | |
Public Member Functions inherited from Mantid::API::FunctionDomain | |
virtual void | reset () const |
Reset the the domain so it can be reused. More... | |
virtual size_t | size () const =0 |
Return the number of points in the domain. More... | |
virtual | ~FunctionDomain ()=default |
Virtual destructor. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Mantid::CurveFitting::SeqDomain | |
static SeqDomain * | create (API::IDomainCreator::DomainType type) |
Create an instance of SeqDomain in one of two forms: either SeqDomain for sequential domain creation or ParDomain for parallel calculations. More... | |
Protected Attributes inherited from Mantid::CurveFitting::SeqDomain | |
std::vector< std::shared_ptr< API::IDomainCreator > > | m_creators |
Domain creators. More... | |
size_t | m_currentIndex |
Current index. More... | |
std::vector< API::FunctionDomain_sptr > | m_domain |
Currently active domain. More... | |
std::vector< API::FunctionValues_sptr > | m_values |
Currently active values. More... | |
An implementation of SeqDomain for parallel cost function and derivatives computation.
Definition at line 23 of file ParDomain.h.
|
inline |
Definition at line 25 of file ParDomain.h.
|
overridevirtual |
Calculate the value of an additive cost function.
Calculate the value of a least squares cost function.
costFunction | :: The cost func to calculate the value for |
Reimplemented from Mantid::CurveFitting::SeqDomain.
Definition at line 35 of file ParDomain.cpp.
References Mantid::CurveFitting::CostFunctions::CostFuncFitting::addVal(), getDomainAndValues(), Mantid::CurveFitting::SeqDomain::getNDomains(), n, and PARALLEL_FOR_NO_WSP_CHECK.
|
overridevirtual |
Calculate the value, first and second derivatives of an additive cost function.
Calculate the value, first and second derivatives of a least squares cost function.
costFunction | :: The cost func to calculate the value for |
evalDeriv | :: Flag to evaluate the first derivatives |
evalHessian | :: Flag to evaluate the Hessian (second derivatives) |
Reimplemented from Mantid::CurveFitting::SeqDomain.
Definition at line 56 of file ParDomain.cpp.
References Mantid::CurveFitting::CostFunctions::CostFuncFitting::addValDerivHessian(), getDomainAndValues(), Mantid::CurveFitting::CostFunctions::CostFuncFitting::getFittingFunction(), Mantid::CurveFitting::SeqDomain::getNDomains(), n, PARALLEL_CRITICAL, PARALLEL_FOR_NO_WSP_CHECK, PARALLEL_SET_DYNAMIC, and PARALLEL_THREAD_NUMBER.
|
overridevirtual |
Create and return i-th domain and i-th values, (i-1)th domain is released.
i | :: Index of domain to return. |
domain | :: Output pointer to the returned domain. |
values | :: Output pointer to the returned values. |
Reimplemented from Mantid::CurveFitting::SeqDomain.
Definition at line 21 of file ParDomain.cpp.
References Mantid::CurveFitting::SeqDomain::m_creators, Mantid::CurveFitting::SeqDomain::m_domain, and Mantid::CurveFitting::SeqDomain::m_values.
Referenced by additiveCostFunctionVal(), and additiveCostFunctionValDerivHessian().