49 if(boost::numeric::empty(x)) {
return Interval<T>(); }
75 const std::string& name) {
76 auto below = a.
lower() < T(-1) || (open && a.
lower() == T(-1));
77 auto above = a.
upper() > T(1) || (open && a.
upper() == T(1));
79 throw std::domain_error(
"Interval has values outside the domain of " +
80 name +
", " + (open ?
"(-1, 1)" :
"[-1, 1]") +
Models a closed numeric interval.
Definition interval.hpp:29
value_t upper() const
Returns the upper bound of the interval.
Definition interval.hpp:127
value_t lower() const
Returns the lower bound of the interval.
Definition interval.hpp:116
Defines the Interval class.
The namespace that contains the implementation details of the library.
Definition convert.hpp:18
Interval< T > from_boost_(const boost_interval_t< T > &x)
Convert a boost interval into a sigma::Interval.
Definition convert.hpp:48
void assert_within_unit_(const Interval< T > &a, bool open, const std::string &name)
Throws unless every value in a lies in the unit interval.
Definition convert.hpp:74
boost_interval_t< T > to_boost_(const Interval< T > &a)
Convert a sigma::Interval into the boost interval it wraps.
Definition convert.hpp:31
boost::numeric::interval< T, interval_policies_t< T > > boost_interval_t
The boost interval type sigma::Interval wraps.
Definition policies.hpp:485
Rounding and checking policies used by the boost interval sigma wraps.