19 ZLimits::ZLimits() : m_lower{true, 0}, m_upper{true, 0} {}
21 ZLimits::ZLimits(
double min,
double max) :
ZLimits({
false, min}, {
false, max}) {}
24 : m_lower(std::move(lower_limit)), m_upper(std::move(upper_limit))
26 if (!lower_limit.m_limitless && !upper_limit.m_limitless
27 && lower_limit.m_value > upper_limit.m_value)
28 throw std::runtime_error(
"ZLimits constructor: "
29 "lower limit bigger than upper limit.");
32 bool ZLimits::isFinite()
const
34 if (m_lower.m_limitless || m_upper.m_limitless)
51 if (left.m_limitless || right.m_limitless)
53 return {
false, std::min(left.m_value, right.m_value)};
58 if (left.m_limitless || right.m_limitless)
60 return {
false, std::max(left.m_value, right.m_value)};
65 if (left.m_limitless != right.m_limitless)
67 if (!left.m_limitless && left.m_value != right.m_value)
74 return !(left == right);
79 return ostr <<
"{" << (limit.m_limitless ?
"true, " :
"false, ") << limit.m_value <<
"}";
84 return {MinLimit(left.lowerLimit(), right.lowerLimit()),
85 MaxLimit(left.upperLimit(), right.upperLimit())};
90 return (left.lowerLimit() == right.lowerLimit() && left.upperLimit() == right.upperLimit());
95 return !(left == right);
100 return ostr <<
"Lower: " << limits.lowerLimit() <<
", Upper: " << limits.upperLimit();
bool operator!=(const BasicVector3D< T > &a, const BasicVector3D< T > &b)
Comparison of two vectors for inequality.
bool operator==(const BasicVector3D< T > &a, const BasicVector3D< T > &b)
Comparison of two vectors for equality.
std::ostream & operator<<(std::ostream &os, const BasicVector3D< T > &a)
Output to stream.
Class that contains upper and lower limits of the z-coordinate for the slicing of form factors.
Helper class that represents a onesided limit.