BornAgain
1.18.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Member Functions | |
RealLimits () | |
bool | hasLowerLimit () const |
double | lowerLimit () const |
void | setLowerLimit (double value) |
void | removeLowerLimit () |
bool | hasUpperLimit () const |
double | upperLimit () const |
void | setUpperLimit (double value) |
void | removeUpperLimit () |
bool | hasLowerAndUpperLimits () const |
void | setLimits (double xmin, double xmax) |
void | removeLimits () |
bool | isInRange (double value) const |
std::string | toString () const |
bool | operator== (const RealLimits &other) const |
bool | operator!= (const RealLimits &other) const |
bool | isLimitless () const |
bool | isPositive () const |
bool | isNonnegative () const |
bool | isLowerLimited () const |
bool | isUpperLimited () const |
bool | isLimited () const |
Static Public Member Functions | |
static RealLimits | lowerLimited (double bound_value) |
static RealLimits | positive () |
static RealLimits | nonnegative () |
static RealLimits | upperLimited (double bound_value) |
static RealLimits | limited (double left_bound_value, double right_bound_value) |
static RealLimits | limitless () |
Protected Member Functions | |
RealLimits (bool has_lower_limit, bool has_upper_limit, double lower_limit, double upper_limit) | |
Protected Attributes | |
bool | m_has_lower_limit |
bool | m_has_upper_limit |
double | m_lower_limit |
double | m_upper_limit |
Friends | |
std::ostream & | operator<< (std::ostream &ostr, const RealLimits &m) |
Limits for a real fit parameter.
Definition at line 24 of file RealLimits.h.
RealLimits::RealLimits | ( | ) |
Definition at line 21 of file RealLimits.cpp.
Referenced by limited(), limitless(), lowerLimited(), and upperLimited().
|
protected |
Definition at line 26 of file RealLimits.cpp.
bool RealLimits::hasLowerLimit | ( | ) | const |
if has lower limit
Definition at line 33 of file RealLimits.cpp.
References m_has_lower_limit.
Referenced by IDistribution1D::adjustMinMaxForLimits(), isInRange(), isLimited(), AttLimits::isLimitless(), isLimitless(), AttLimits::isLowerLimited(), isLowerLimited(), isNonnegative(), isPositive(), AttLimits::isUpperLimited(), and isUpperLimited().
double RealLimits::lowerLimit | ( | ) | const |
Returns lower limit.
Definition at line 38 of file RealLimits.cpp.
References m_lower_limit.
Referenced by IDistribution1D::adjustMinMaxForLimits(), RangedDistribution::checkInitialization(), isNonnegative(), isPositive(), AttLimits::lowerLimit(), pyfmt::printRealLimits(), and toString().
void RealLimits::setLowerLimit | ( | double | value | ) |
Sets lower limit.
Definition at line 43 of file RealLimits.cpp.
References m_has_lower_limit, and m_lower_limit.
Referenced by setLimits().
void RealLimits::removeLowerLimit | ( | ) |
remove lower limit
Definition at line 49 of file RealLimits.cpp.
References m_has_lower_limit, and m_lower_limit.
Referenced by removeLimits().
bool RealLimits::hasUpperLimit | ( | ) | const |
if has upper limit
Definition at line 55 of file RealLimits.cpp.
References m_has_upper_limit.
Referenced by IDistribution1D::adjustMinMaxForLimits(), isInRange(), isLimited(), AttLimits::isLimitless(), isLimitless(), AttLimits::isLowerLimited(), isLowerLimited(), isNonnegative(), isPositive(), AttLimits::isUpperLimited(), and isUpperLimited().
double RealLimits::upperLimit | ( | ) | const |
Returns upper limit.
Definition at line 60 of file RealLimits.cpp.
References m_upper_limit.
Referenced by IDistribution1D::adjustMinMaxForLimits(), RangedDistribution::checkInitialization(), pyfmt::printRealLimits(), toString(), and AttLimits::upperLimit().
void RealLimits::setUpperLimit | ( | double | value | ) |
Sets upper limit.
Definition at line 65 of file RealLimits.cpp.
References m_has_upper_limit, and m_upper_limit.
Referenced by setLimits().
void RealLimits::removeUpperLimit | ( | ) |
remove upper limit
Definition at line 71 of file RealLimits.cpp.
References m_has_upper_limit, and m_upper_limit.
Referenced by removeLimits().
bool RealLimits::hasLowerAndUpperLimits | ( | ) | const |
if has lower and upper limit
Definition at line 77 of file RealLimits.cpp.
References m_has_lower_limit, and m_has_upper_limit.
Referenced by RangedDistribution::checkInitialization(), and AttLimits::isLimited().
void RealLimits::setLimits | ( | double | xmin, |
double | xmax | ||
) |
Sets lower and upper limits.
Definition at line 82 of file RealLimits.cpp.
References setLowerLimit(), and setUpperLimit().
void RealLimits::removeLimits | ( | ) |
remove limits
Definition at line 88 of file RealLimits.cpp.
References removeLowerLimit(), and removeUpperLimit().
Referenced by AttLimits::setFixed().
bool RealLimits::isInRange | ( | double | value | ) | const |
returns true if proposed value is in limits range
Definition at line 94 of file RealLimits.cpp.
References hasLowerLimit(), hasUpperLimit(), m_lower_limit, and m_upper_limit.
Referenced by DepthProbeSimulation::generateSimulationElements(), RealParameter::RealParameter(), and RealParameter::setValue().
|
static |
Creates an object bounded from the left.
Definition at line 103 of file RealLimits.cpp.
References RealLimits().
Referenced by AttLimits::lowerLimited(), nonnegative(), and positive().
|
static |
Creates an object which can have only positive values (>0., zero is not included)
Definition at line 108 of file RealLimits.cpp.
References lowerLimited().
Referenced by AttLimits::positive(), and RealParameter::setPositive().
|
static |
Creates an object which can have only positive values with 0. included.
Definition at line 113 of file RealLimits.cpp.
References lowerLimited().
Referenced by AttLimits::nonnegative(), and RealParameter::setNonnegative().
|
static |
Creates an object bounded from the right.
Definition at line 118 of file RealLimits.cpp.
References RealLimits().
Referenced by AttLimits::upperLimited().
|
static |
Creates an object bounded from the left and right.
Definition at line 123 of file RealLimits.cpp.
References RealLimits().
Referenced by SpheresWithLimitsDistributionBuilder::buildSample(), ConesWithLimitsDistributionBuilder::buildSample(), LinkedBoxDistributionBuilder::buildSample(), DepthProbeSimulation::initialize(), SpecularSimulation::initialize(), AttLimits::limited(), and RealParameter::setLimited().
|
static |
Creates an object withoud bounds (default)
Definition at line 128 of file RealLimits.cpp.
References RealLimits().
Referenced by AttLimits::fixed().
std::string RealLimits::toString | ( | ) | const |
Definition at line 133 of file RealLimits.cpp.
References isLimited(), isLimitless(), isLowerLimited(), isNonnegative(), isPositive(), isUpperLimited(), lowerLimit(), and upperLimit().
bool RealLimits::operator== | ( | const RealLimits & | other | ) | const |
Definition at line 159 of file RealLimits.cpp.
References m_has_lower_limit, m_has_upper_limit, m_lower_limit, and m_upper_limit.
bool RealLimits::operator!= | ( | const RealLimits & | other | ) | const |
Definition at line 166 of file RealLimits.cpp.
bool RealLimits::isLimitless | ( | ) | const |
Definition at line 171 of file RealLimits.cpp.
References hasLowerLimit(), and hasUpperLimit().
Referenced by pyfmt::printRealLimits(), pyfmt::printRealLimitsArg(), RangedDistribution::pyString(), and toString().
bool RealLimits::isPositive | ( | ) | const |
Definition at line 176 of file RealLimits.cpp.
References hasLowerLimit(), hasUpperLimit(), and lowerLimit().
Referenced by pyfmt::printRealLimits(), and toString().
bool RealLimits::isNonnegative | ( | ) | const |
Definition at line 182 of file RealLimits.cpp.
References hasLowerLimit(), hasUpperLimit(), and lowerLimit().
Referenced by pyfmt::printRealLimits(), and toString().
bool RealLimits::isLowerLimited | ( | ) | const |
Definition at line 187 of file RealLimits.cpp.
References hasLowerLimit(), and hasUpperLimit().
Referenced by pyfmt::printRealLimits(), and toString().
bool RealLimits::isUpperLimited | ( | ) | const |
Definition at line 192 of file RealLimits.cpp.
References hasLowerLimit(), and hasUpperLimit().
Referenced by pyfmt::printRealLimits(), and toString().
bool RealLimits::isLimited | ( | ) | const |
Definition at line 197 of file RealLimits.cpp.
References hasLowerLimit(), and hasUpperLimit().
Referenced by pyfmt::printRealLimits(), and toString().
|
friend |
|
protected |
Definition at line 105 of file RealLimits.h.
Referenced by hasLowerAndUpperLimits(), hasLowerLimit(), operator==(), removeLowerLimit(), and setLowerLimit().
|
protected |
parameter has lower bound
Definition at line 106 of file RealLimits.h.
Referenced by hasLowerAndUpperLimits(), hasUpperLimit(), operator==(), removeUpperLimit(), and setUpperLimit().
|
protected |
parameter has upper bound
Definition at line 107 of file RealLimits.h.
Referenced by isInRange(), lowerLimit(), operator==(), removeLowerLimit(), and setLowerLimit().
|
protected |
minimum allowed value
Definition at line 108 of file RealLimits.h.
Referenced by isInRange(), operator==(), removeUpperLimit(), setUpperLimit(), and upperLimit().