Boost C++ Libraries of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.

Class template continuous_interval



// In header: <boost/icl/continuous_interval.hpp>

template<typename DomainT, 
class continuous_interval {
  // types
  typedef continuous_interval< DomainT, Compare > type;               
  typedef DomainT                                 domain_type;        
  typedef bounded_value< DomainT >::type          bounded_domain_type;

  // construct/copy/destruct
  explicit continuous_interval(const DomainT &);
  continuous_interval(const DomainT &, const DomainT &, 
                      interval_bounds = interval_bounds::right_open(), 
                      continuous_interval * = 0);

  // public member functions
  typedef ICL_COMPARE_DOMAIN(Compare, DomainT);
  domain_type lower() const;
  domain_type upper() const;
  interval_bounds bounds() const;

  // public static functions
  static continuous_interval open(const DomainT &, const DomainT &);
  static continuous_interval right_open(const DomainT &, const DomainT &);
  static continuous_interval left_open(const DomainT &, const DomainT &);
  static continuous_interval closed(const DomainT &, const DomainT &);


continuous_interval public construct/copy/destruct

  1. continuous_interval();

    Default constructor; yields an empty interval [0,0).

  2. explicit continuous_interval(const DomainT & val);

    Constructor for a closed singleton interval [val,val]

  3. continuous_interval(const DomainT & low, const DomainT & up, 
                        interval_bounds bounds = interval_bounds::right_open(), 
                        continuous_interval * = 0);

    Interval from low to up with bounds bounds

continuous_interval public member functions

  1. typedef ICL_COMPARE_DOMAIN(Compare, DomainT);
  2. domain_type lower() const;
  3. domain_type upper() const;
  4. interval_bounds bounds() const;

continuous_interval public static functions

  1. static continuous_interval open(const DomainT & lo, const DomainT & up);
  2. static continuous_interval right_open(const DomainT & lo, const DomainT & up);
  3. static continuous_interval left_open(const DomainT & lo, const DomainT & up);
  4. static continuous_interval closed(const DomainT & lo, const DomainT & up);