13#include "MantidCurveFitting/DllConfig.h"
16namespace CurveFitting {
17namespace Constraints {
39 const double upperBound,
bool isDefault =
false);
43 bool isDefault =
false);
49 void setPenaltyFactor(
const double &c)
override;
53 bool hasLower()
const {
return m_hasLowerBound; }
55 bool hasUpper()
const {
return m_hasUpperBound; }
57 const double &
lower()
const {
return m_lowerBound; }
59 const double &
upper()
const {
return m_upperBound; }
63 m_hasLowerBound =
true;
68 m_hasUpperBound =
true;
73 m_hasLowerBound =
false;
74 m_lowerBound = double();
78 m_hasUpperBound =
false;
79 m_upperBound = double();
98 double check()
override;
99 double checkDeriv()
override;
100 double checkDeriv2()
override;
101 void setParamToSatisfyConstraint()
override;
102 std::string asString()
const override;
double value
The value of the point.
double lower
lower and upper bounds on the multiplier, if known
This class represents an expression made up of names, binary operators and brackets.
An interface to a constraint.
This is an interface to a fitting function - a semi-abstarct class.
A boundary constraint is designed to be used to set either upper or lower (or both) boundaries on a s...
bool m_hasLowerBound
name of parameter you want to constraint
void setLower(const double &value)
Set lower bound value.
double m_lowerBound
the lower bound
void clearUpper()
Clear upper bound value.
bool m_hasUpperBound
has a upper bound set true/false
void clearLower()
Clear lower bound value.
double m_penaltyFactor
Penalty factor for the given boundary constraint.
const double & upper() const
Return the upper bound value.
void clearBounds()
Clear both bounds (lower and upper) at the same time.
double getPenaltyFactor() const override
get the penalty factor for the constraint
const double & lower() const
Return the lower bound value.
void setUpper(const double &value)
Set upper bound value.
bool hasLower() const
Return if it has a lower bound.
double m_upperBound
the upper bound
bool hasUpper() const
Return if it has a lower bound.
void setBounds(const double &lower, const double &upper)
Set both bounds (lower and upper) at the same time.
Helper class which provides the Collimation Length for SANS instruments.