Mantid
|
An interface to a constraint. More...
#include <IConstraint.h>
Public Member Functions | |
virtual std::string | asString () const =0 |
Return the string that can be used in this->initialize() to recreate this constraint. More... | |
virtual double | check ()=0 |
Returns a penalty number which is bigger than or equal to zero If zero it means that the constraint is not penalized. More... | |
virtual double | checkDeriv ()=0 |
Returns the derivative of the penalty for each active parameter. More... | |
virtual double | checkDeriv2 ()=0 |
Returns the derivative of the penalty for each active parameter. More... | |
virtual double | getPenaltyFactor () const =0 |
get the penalty factor for the constraint More... | |
virtual void | initialize (IFunction *fun, const Expression &expr, bool isDefault=false)=0 |
Initialize the constraint from an expression. More... | |
virtual void | setParamToSatisfyConstraint ()=0 |
Set the parameters of IFitFunction to satisfy constraint. More... | |
virtual void | setPenaltyFactor (const double &c)=0 |
set the penalty factor for the constraint Set panelty factor. More... | |
Public Member Functions inherited from Mantid::API::ParameterReference | |
IFunction * | getLocalFunction () const |
Return pointer to the local function. More... | |
std::size_t | getLocalIndex () const |
Return parameter index in the local function. More... | |
double | getParameter () const |
Get the value of the parameter. More... | |
bool | isDefault () const |
Returns the default value flag. More... | |
bool | isParameterOf (const IFunction *fun) const |
Find out if this refers to a parameter of a function: direct or via composite function member. More... | |
IFunction * | ownerFunction () const |
std::size_t | parameterIndex () const |
Return parameter index in the owning function. More... | |
std::string | parameterName () const |
Return parameter name in the owning function. More... | |
ParameterReference () | |
Default constructor. More... | |
ParameterReference (IFunction *fun, std::size_t index, bool isDefault=false) | |
Constructor. More... | |
void | setParameter (const double &value, bool isExplicitlySet=true) |
Set the parameter. More... | |
virtual | ~ParameterReference ()=default |
Static Public Member Functions | |
static double | getDefaultPenaltyFactor () |
Return the value for default fitting penalties. More... | |
Static Protected Attributes | |
static constexpr double | m_defaultPenaltyFactor = 1000 |
default penalty factor for constraints More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Mantid::API::ParameterReference | |
void | reset (IFunction *fun, std::size_t index, bool isDefault=false) |
Reset the reference. More... | |
|
pure virtual |
Return the string that can be used in this->initialize() to recreate this constraint.
Implemented in Mantid::CurveFitting::Constraints::BoundaryConstraint.
Referenced by MantidQt::MantidWidgets::PropertyHandler::initParameters().
|
pure virtual |
Returns a penalty number which is bigger than or equal to zero If zero it means that the constraint is not penalized.
If larger than zero the constraint is penalized where the larger this number is the larger the penalty
Implemented in Mantid::CurveFitting::Constraints::BoundaryConstraint.
Referenced by Mantid::Crystal::PeakHKLErrors::function1D(), Mantid::CurveFitting::Functions::BivariateNormal::function1D(), Mantid::CurveFitting::CostFunctions::CostFuncFitting::val(), and Mantid::CurveFitting::CostFunctions::CostFuncFitting::valDerivHessian().
|
pure virtual |
Returns the derivative of the penalty for each active parameter.
Implemented in Mantid::CurveFitting::Constraints::BoundaryConstraint.
Referenced by Mantid::CurveFitting::gsl_f(), and Mantid::CurveFitting::CostFunctions::CostFuncFitting::valDerivHessian().
|
pure virtual |
Returns the derivative of the penalty for each active parameter.
Implemented in Mantid::CurveFitting::Constraints::BoundaryConstraint.
Referenced by Mantid::CurveFitting::gsl_df(), and Mantid::CurveFitting::CostFunctions::CostFuncFitting::valDerivHessian().
|
inlinestatic |
Return the value for default fitting penalties.
Definition at line 64 of file IConstraint.h.
Referenced by Mantid::CurveFitting::Constraints::BoundaryConstraint::asString().
|
pure virtual |
get the penalty factor for the constraint
Implemented in Mantid::CurveFitting::Constraints::BoundaryConstraint.
|
pure virtual |
Initialize the constraint from an expression.
Implemented in Mantid::CurveFitting::Constraints::BoundaryConstraint.
Referenced by Mantid::API::ConstraintFactoryImpl::createInitialized().
|
pure virtual |
Set the parameters of IFitFunction to satisfy constraint.
For example for a BoundaryConstraint this if param value less than lower boundary it is set to that value and vice versa for if the param value is larger than the upper boundary value.
Implemented in Mantid::CurveFitting::Constraints::BoundaryConstraint.
Referenced by Mantid::CurveFitting::CostFunctions::CostFuncFitting::reset().
|
pure virtual |
set the penalty factor for the constraint Set panelty factor.
The larger the number to thigter the constraint. This number must be set to a number larger than zero
c | :: the penalt factor |
Implemented in Mantid::CurveFitting::Constraints::BoundaryConstraint.
Referenced by Mantid::CurveFitting::Functions::BivariateNormal::function1D(), and Mantid::API::IFunction::setMatrixWorkspace().
|
staticconstexprprotected |
default penalty factor for constraints
Definition at line 68 of file IConstraint.h.