66 bool left_open =
false,
67 bool right_open =
false) {
94 const std::string& name) {
100 throw std::domain_error(
"Interval has values outside the domain of " +
101 name +
", " + (open ?
"(-1, 1)" :
"[-1, 1]") +
Models an interval whose bounds may be open.
Definition general_interval.hpp:36
const closure_t & closure() const
Returns the closure of the interval.
Definition general_interval.hpp:189
bool right_closed() const
Is upper() contained in the interval?
Definition general_interval.hpp:161
bool left_closed() const
Is lower() contained in the interval?
Definition general_interval.hpp:144
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
Conversions between sigma::Interval and the boost interval it wraps.
Defines the GeneralInterval class.
The namespace that contains the implementation details of the library.
Definition convert.hpp:18
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
GeneralInterval< T > general_from_boost_(const boost_interval_t< T > &x, bool left_open=false, bool right_open=false)
Convert a boost interval into a sigma::GeneralInterval.
Definition general_convert.hpp:65
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