BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Limits for double. More...
Public Member Functions | |
RealLimits () | |
bool | hasLowerAndUpperLimits () const |
if has lower and upper limit More... | |
bool | hasLowerLimit () const |
if has lower limit More... | |
bool | hasUpperLimit () const |
if has upper limit More... | |
bool | isInRange (double value) const |
returns true if proposed value is in limits range More... | |
bool | isLimited () const |
bool | isLimitless () const |
bool | isLowerLimited () const |
bool | isNonnegative () const |
bool | isPositive () const |
bool | isUpperLimited () const |
double | lowerLimit () const |
Returns lower limit. More... | |
bool | operator!= (const RealLimits &other) const |
bool | operator< (const RealLimits &other) const |
bool | operator== (const RealLimits &other) const |
double | upperLimit () const |
Returns upper limit. More... | |
Static Public Member Functions | |
static RealLimits | limited (double left_bound_value, double right_bound_value) |
Creates an object bounded from the left and right. More... | |
static RealLimits | limitless () |
Creates an object withoud bounds (default) More... | |
static RealLimits | lowerLimited (double bound_value) |
Creates an object bounded from the left. More... | |
static RealLimits | nonnegative () |
Creates an object which can have only positive values with 0. included. More... | |
static RealLimits | positive () |
Creates an object which can have only positive values (>0., zero is not included) More... | |
static RealLimits | upperLimited (double bound_value) |
Creates an object bounded from the right. More... | |
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 |
parameter has lower bound More... | |
double | m_lower_limit |
parameter has upper bound More... | |
double | m_upper_limit |
minimum allowed value More... | |
Limits for double.
Definition at line 25 of file reallimits.h.
RealLimits::RealLimits | ( | ) |
Definition at line 27 of file reallimits.cpp.
Referenced by limited(), limitless(), lowerLimited(), and upperLimited().
|
protected |
Definition at line 32 of file reallimits.cpp.
bool RealLimits::hasLowerAndUpperLimits | ( | ) | const |
if has lower and upper limit
Definition at line 91 of file reallimits.cpp.
References m_has_lower_limit, and m_has_upper_limit.
Referenced by TEST_F().
bool RealLimits::hasLowerLimit | ( | ) | const |
if has lower limit
Definition at line 71 of file reallimits.cpp.
References m_has_lower_limit.
Referenced by isInRange(), isLimited(), isLimitless(), isLowerLimited(), isNonnegative(), isPositive(), isUpperLimited(), and TEST_F().
bool RealLimits::hasUpperLimit | ( | ) | const |
if has upper limit
Definition at line 81 of file reallimits.cpp.
References m_has_upper_limit.
Referenced by isInRange(), isLimited(), isLimitless(), isLowerLimited(), isNonnegative(), isPositive(), isUpperLimited(), and TEST_F().
bool RealLimits::isInRange | ( | double | value | ) | const |
returns true if proposed value is in limits range
Definition at line 96 of file reallimits.cpp.
References hasLowerLimit(), hasUpperLimit(), m_lower_limit, and m_upper_limit.
Referenced by TEST_F().
bool RealLimits::isLimited | ( | ) | const |
Definition at line 151 of file reallimits.cpp.
References hasLowerLimit(), and hasUpperLimit().
Referenced by TEST_F(), and ModelView::JsonUtils::ToString().
bool RealLimits::isLimitless | ( | ) | const |
Definition at line 125 of file reallimits.cpp.
References hasLowerLimit(), and hasUpperLimit().
Referenced by ModelView::JsonUtils::ToString().
bool RealLimits::isLowerLimited | ( | ) | const |
Definition at line 141 of file reallimits.cpp.
References hasLowerLimit(), hasUpperLimit(), isNonnegative(), and isPositive().
Referenced by TEST_F(), and ModelView::JsonUtils::ToString().
bool RealLimits::isNonnegative | ( | ) | const |
Definition at line 136 of file reallimits.cpp.
References hasLowerLimit(), hasUpperLimit(), and lowerLimit().
Referenced by isLowerLimited(), TEST_F(), and ModelView::JsonUtils::ToString().
bool RealLimits::isPositive | ( | ) | const |
Definition at line 130 of file reallimits.cpp.
References hasLowerLimit(), hasUpperLimit(), and lowerLimit().
Referenced by isLowerLimited(), TEST_F(), and ModelView::JsonUtils::ToString().
bool RealLimits::isUpperLimited | ( | ) | const |
Definition at line 146 of file reallimits.cpp.
References hasLowerLimit(), and hasUpperLimit().
Referenced by TEST_F(), and ModelView::JsonUtils::ToString().
|
static |
Creates an object bounded from the left and right.
Definition at line 61 of file reallimits.cpp.
References RealLimits().
Referenced by ModelView::PenItem::PenItem(), ModelView::JsonUtils::CreateLimits(), and TEST_F().
|
static |
Creates an object withoud bounds (default)
Definition at line 66 of file reallimits.cpp.
References RealLimits().
Referenced by gui2::SLDMaterialItem::SLDMaterialItem(), ModelView::CompoundItem::addProperty(), and TEST_F().
double RealLimits::lowerLimit | ( | ) | const |
Returns lower limit.
Definition at line 76 of file reallimits.cpp.
References m_lower_limit.
Referenced by isNonnegative(), isPositive(), and TEST_F().
|
static |
Creates an object bounded from the left.
Definition at line 41 of file reallimits.cpp.
References RealLimits().
Referenced by ModelView::JsonUtils::CreateLimits(), nonnegative(), positive(), and TEST_F().
|
static |
Creates an object which can have only positive values with 0. included.
Definition at line 51 of file reallimits.cpp.
References lowerLimited().
Referenced by ModelView::JsonUtils::CreateLimits(), and TEST_F().
bool RealLimits::operator!= | ( | const RealLimits & | other | ) | const |
Definition at line 115 of file reallimits.cpp.
bool RealLimits::operator< | ( | const RealLimits & | other | ) | const |
Definition at line 120 of file reallimits.cpp.
References m_lower_limit, and m_upper_limit.
bool RealLimits::operator== | ( | const RealLimits & | other | ) | const |
Definition at line 105 of file reallimits.cpp.
References m_has_lower_limit, m_has_upper_limit, m_lower_limit, and m_upper_limit.
|
static |
Creates an object which can have only positive values (>0., zero is not included)
Definition at line 46 of file reallimits.cpp.
References lowerLimited().
Referenced by ModelView::JsonUtils::CreateLimits(), and TEST_F().
double RealLimits::upperLimit | ( | ) | const |
Returns upper limit.
Definition at line 86 of file reallimits.cpp.
References m_upper_limit.
Referenced by TEST_F().
|
static |
Creates an object bounded from the right.
Definition at line 56 of file reallimits.cpp.
References RealLimits().
Referenced by ModelView::JsonUtils::CreateLimits(), and TEST_F().
|
protected |
Definition at line 79 of file reallimits.h.
Referenced by hasLowerAndUpperLimits(), hasLowerLimit(), and operator==().
|
protected |
parameter has lower bound
Definition at line 80 of file reallimits.h.
Referenced by hasLowerAndUpperLimits(), hasUpperLimit(), and operator==().
|
protected |
parameter has upper bound
Definition at line 81 of file reallimits.h.
Referenced by isInRange(), lowerLimit(), operator<(), and operator==().
|
protected |
minimum allowed value
Definition at line 82 of file reallimits.h.
Referenced by isInRange(), operator<(), operator==(), and upperLimit().