11 if(a.
lower() >= 0) {
return a; }
14 if(a.
upper() <= 0) {
return -a; }
17 auto abs_low = std::abs(a.
lower());
18 auto abs_high = std::abs(a.
upper());
19 if(abs_low < abs_high) {
21 }
else if(abs_low > abs_high) {
Models an interval whose bounds may be open.
Definition general_interval.hpp:36
bool empty() const
Is *this the empty interval?
Definition general_interval.hpp:127
bool left_open() const
Is lower() NOT contained in the interval?
Definition general_interval.hpp:136
bool right_open() const
Is upper() NOT contained in the interval?
Definition general_interval.hpp:153
value_t lower() const
Returns the lower bound of the interval.
Definition general_interval.hpp:169
value_t upper() const
Returns the upper bound of the interval.
Definition general_interval.hpp:177
Defines the GeneralInterval class.
The primary namespace for the sigma library.
Definition affine.hpp:12
Affine< T > abs(const Affine< T > &a)
Absolute Value of an affine form.
Definition basic.ipp:9
Affine< T > fabs(const Affine< T > &a)
Absolute Value of an affine form.
Definition basic.ipp:22