Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template split_interval_set

boost::itl::split_interval_set — implements a set as a set of intervals - on insertion overlapping intervals are split

Synopsis

template<typename DomainT , 
         ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT), 
         template< class, ITL_COMPARE >class Interval = itl::interval, 
         ITL_ALLOC Alloc = std::allocator> 
class split_interval_set : public boost::itl::interval_base_set< boost::itl::split_interval_set< DomainT, Compare, Interval, Alloc >, DomainT, Compare, Interval, Alloc >
{
public:
  // types
  typedef interval_base_set< itl::split_interval_set< DomainT, Compare, Interval, Alloc >, DomainT, Compare, Interval, Alloc > base_type;            
  typedef split_interval_set< DomainT, Compare, Interval, Alloc >                                                              type;                 
  typedef interval_set< DomainT, Compare, Interval, Alloc >                                                                    joint_type;           
  typedef type                                                                                                                 overloadable_type;      // Auxilliary type for overloadresolution. 
  typedef DomainT                                                                                                              domain_type;            // The domain type of the set. 
  typedef DomainT                                                                                                              codomain_type;          // The codomaintype is the same as domain_type. 
  typedef DomainT                                                                                                              element_type;           // The element type of the set. 
  typedef Interval< DomainT, Compare >                                                                                         interval_type;          // The interval type of the set. 
  typedef interval_type                                                                                                        segment_type;           // The segment type of the set. 
  typedef exclusive_less< interval_type >                                                                                      interval_compare;       // Comparison functor for intervals. 
  typedef exclusive_less< interval_type >                                                                                      key_compare;            // Comparison functor for keys. 
  typedef Alloc< interval_type >                                                                                               allocator_type;         // The allocator type of the set. 
  typedef Alloc< DomainT >                                                                                                     domain_allocator_type;  // allocator type of the corresponding element set 
  typedef itl::set< DomainT, Compare, Alloc >                                                                                  atomized_type;          // The corresponding atomized type representing this interval container of elements. 
  typedef itl::set< interval_type, ITL_EXCLUSIVE_LESS(interval_type), Alloc >                                                  ImplSetT;               // Container type for the implementation. 
  typedef ImplSetT::key_type                                                                                                   key_type;               // key type of the implementing container 
  typedef ImplSetT::data_type                                                                                                  data_type;              // data type of the implementing container 
  typedef ImplSetT::value_type                                                                                                 value_type;             // value type of the implementing container 
  typedef ImplSetT::iterator                                                                                                   iterator;               // iterator for iteration over intervals 
  typedef ImplSetT::const_iterator                                                                                             const_iterator;         // const_iterator for iteration over intervals 

  // construct/copy/destruct
  split_interval_set();
  split_interval_set(const split_interval_set &);
  template<class SubType > 
    split_interval_set(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > &);
  split_interval_set(const interval_type &);
  split_interval_set(const domain_type &);
  template<class SubType > 
    split_interval_set& 
    operator=(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > &);

  // public member functions
  typedef ITL_COMPARE_DOMAIN(Compare, DomainT) ;
  template<class SubType > 
    void assign(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > &) ;

  // private member functions
  bool contains_(const interval_type &) const;
  void add_(const value_type &) ;
  iterator add_(iterator, const value_type &) ;
  void subtract_(const value_type &) ;
  void handle_neighbours(const iterator &) ;
  void add_front(const interval_type &, iterator &) ;
  void add_main(interval_type &, iterator &, const iterator &) ;
  void add_segment(const interval_type &, iterator &) ;
  void add_rear(const interval_type &, iterator &) ;
  void subtract_rest(const interval_type &, iterator &, iterator &) ;
};

Description

split_interval_set public construct/copy/destruct

  1. split_interval_set();
  2. split_interval_set(const split_interval_set & src);
  3. template<class SubType > 
      split_interval_set(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > & src);
  4. split_interval_set(const interval_type & elem);
  5. split_interval_set(const domain_type & itv);
  6. template<class SubType > 
      split_interval_set& 
      operator=(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > & src);

split_interval_set public member functions

  1. typedef ITL_COMPARE_DOMAIN(Compare, DomainT) ;
  2. template<class SubType > 
      void assign(const interval_base_set< SubType, DomainT, Compare, Interval, Alloc > & src) ;

split_interval_set private member functions

  1. bool contains_(const interval_type & sub) const;
    sub
  2. void add_(const value_type & addend) ;
    addend
  3. iterator add_(iterator prior_, const value_type & addend) ;
  4. void subtract_(const value_type & minuend) ;
    minuend
  5. void handle_neighbours(const iterator & it_) ;
  6. void add_front(const interval_type & inter_val, iterator & first_) ;
  7. void add_main(interval_type & inter_val, iterator & it_, 
                  const iterator & last_) ;
  8. void add_segment(const interval_type & inter_val, iterator & it_) ;
  9. void add_rear(const interval_type & inter_val, iterator & it_) ;
  10. void subtract_rest(const interval_type & x_itv, iterator & it_, 
                       iterator & end_) ;

PrevUpHomeNext