Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51208 - in sandbox/itl: boost/itl libs/itl/doc libs/itl_xt/test
From: afojgo_at_[hidden]
Date: 2009-02-11 16:13:42


Author: jofaber
Date: 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
New Revision: 51208
URL: http://svn.boost.org/trac/boost/changeset/51208

Log:
Reviewed Documentation. Reworked set, map, interval_base_{set,map}. Stable {msvc-9.0, partly congcc-4.3-a7}

Text files modified:
   sandbox/itl/boost/itl/interval.hpp | 170 +++++++------
   sandbox/itl/boost/itl/interval_base_map.hpp | 489 +++++++++++++--------------------------
   sandbox/itl/boost/itl/interval_base_set.hpp | 259 ++++++--------------
   sandbox/itl/boost/itl/interval_maps.hpp | 2
   sandbox/itl/boost/itl/map.hpp | 37 ++
   sandbox/itl/boost/itl/set.hpp | 4
   sandbox/itl/libs/itl/doc/interface.qbk | 2
   sandbox/itl/libs/itl_xt/test/itvmaptester.h | 3
   8 files changed, 371 insertions(+), 595 deletions(-)

Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp (original)
+++ sandbox/itl/boost/itl/interval.hpp 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
@@ -285,20 +285,6 @@
 typedef unsigned char bound_type;
 
 /// A class template for intervals
-/** Bounds of the interval may be closed or open.
- Discrete or continuous datatypes may be used as domain datatypes DomainT.
-
- Template parameter <b>DomainT</b>:
- The intervals domain type or type of the elements of the interval.
- The interface <b>DomainT</b> has to be implemented by any actual template
- parameter.
-
- The class defines intervals with closed or open bounds for discrete
- <tt>(short, int, date, time etc.)</tt> and continuous
- <tt>float, double, Rational etc.</tt> elements. The domain parameter
- may be a built in c++ datatype or a class type. It has to implement
- the interface DomainT.
-*/
 template <class DomainT, ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT)>
 #ifdef USE_CONCEPTS
         requires std::LessThanComparable<DomainT>
@@ -366,18 +352,24 @@
     //NOTE: Compiler generated assignment operator = used
 
         //==========================================================================
- //= Emptieness, containmnet
+ //= Emptieness, containment
         //==========================================================================
     /** Is the interval empty? */
     bool empty()const;
 
+ /** Set the interval empty */
+ void clear()
+ { set_lwb(unon<DomainT>::value()); set_upb(neutron<DomainT>::value());
+ _boundtype=itl::closed_bounded; }
+
     /** Does the interval contain <tt>x</tt>? */
     bool contains(const DomainT& x)const;
- /** <tt>*this</tt> is subset of <tt>super</tt> */
- bool contained_in(const interval& super)const ;
     /** <tt>*this</tt> is superset of <tt>sub</tt> */
     bool contains(const interval& sub)const;
 
+ /** <tt>*this</tt> is subset of <tt>super</tt> */
+ bool contained_in(const interval& super)const ;
+
     /** <tt>*this</tt> and <tt>x2</tt> are disjoint; their intersection is empty */
     bool is_disjoint(const interval& x2)const
     { return exclusive_less(x2) || x2.exclusive_less(*this); }
@@ -401,65 +393,42 @@
     DomainT lower()const { return _lwb; }
     /** Upper bound of the interval */
     DomainT upper()const { return _upb; }
- /** Typ of interval bounds */
- bound_type boundtype()const { return _boundtype; }
-
 
- /** What type is the interval?
-\code
-interval.is(closed_bounded); //[x, y] a closed interval
-interval.is(right_open); //[x, y) a right-open interval (also left-closed interval)
-interval.is(left_open); //(x, y] a left-open interval (also right-closed interval)
-interval.is(open_bounded); //(x, y) an open interval
-\endcode
- */
- bool is(bound_type bounded)const { return _boundtype == bounded; }
-
- /** What bound type is the left interval border?
-\code
-interval.is_left(closed_bounded); //[x, y] or [x, y)
-interval.is_left(open_bounded); //(x, y] or (x, y)
-\endcode
- */
- bool is_left(bound_type bounded)const
- {
- BOOST_ASSERT(bounded == itl::open_bounded || bounded == itl::closed_bounded);
- return ((_boundtype & right_open)>>1) == (bounded>>1);
- }
-
- /** What bound type is the right interval border?
-\code
-interval.is_right(closed_bounded); //[x, y] or (x, y]
-interval.is_right(open_bounded); //[x, y) or (x, y)
-\endcode
- */
- bool is_right(bound_type bounded)const
- {
- BOOST_ASSERT(bounded == itl::open_bounded || bounded == itl::closed_bounded);
- return ((_boundtype & left_open) == (bounded>>1));
- }
+ /** First (smallest) element of the interval */
+ DomainT first()const;
+ /** Last (largest) element of the interval */
+ DomainT last()const;
 
+ //==========================================================================
+ //= Selection
+ //==========================================================================
 
- /** There is no gap between <tt>*this</tt> and <tt>x2</tt> but they have no element in common */
- bool touches(const interval& x2)const;
+ /** Typ of interval bounds */
+ bound_type boundtype()const { return _boundtype; }
 
- /** Maximal element of <tt>*this</tt> is less than the minimal element of <tt>x2</tt> */
- bool exclusive_less(const interval& x2)const;
+ //==========================================================================
+ //= Addition
+ //==========================================================================
 
- /** Set the interval empty */
- void clear()
- { set_lwb(unon<DomainT>::value()); set_upb(neutron<DomainT>::value()); _boundtype=itl::closed_bounded; }
+ /** Extend <tt>*this</tt> to <tt>x2</tt> yielding an interval from the
+ minimum of lower bounds to the
+ maximum of upper bounds */
+ interval& extend(const interval& x2);
 
- /** Set \c *this interval to from \c low to \c up with boundtype \c bounds */
- interval& set(const DomainT& low, const DomainT& up, bound_type bounds)
- { _lwb=low; _upb=up; _boundtype=bounds; return *this; }
+ /** Interval spanning from lower bound of \c *this interval to the upper bound of \c rhs.
+ Bordertypes according to the lower bound of \c *this and the upper bound of \c rhs. */
+ interval span(const interval& rhs)const
+ {
+ if(empty()) return rhs;
+ else if(rhs.empty()) return *this;
+ else return
+ interval(_lwb, rhs._upb, span(boundtype(), rhs.boundtype()));
+ }
 
- /** Extend <tt>*this</tt> to <tt>x2</tt> yielding an interval from the minimum of lower bounds
- to the maximum of upper bounds */
- interval& extend(const interval& x2);
 
- /** Intersection with the interval <tt>x2</tt>; assign result to <tt>isec</tt> */
- void intersect(interval& isec, const interval& x2)const;
+ //==========================================================================
+ //= Subtraction
+ //==========================================================================
 
     /** subtract \c x2 from \c *this interval on it's left side. Assign the difference
                 to \c right_over. The result \c right_over is the part of \c *this right of \c x2.
@@ -503,26 +472,65 @@
         */
         interval& right_subtract(const interval& x2);
 
- /** Interval spanning from lower bound of \c *this interval to the upper bound of \c rhs.
- Bordertypes according to the lower bound of \c *this and the upper bound of \c rhs. */
- interval span(const interval& rhs)const
- {
- if(empty()) return rhs;
- else if(rhs.empty()) return *this;
- else return
- interval(_lwb, rhs._upb, span(boundtype(), rhs.boundtype()));
- }
+ //==========================================================================
+ //= Intersection
+ //==========================================================================
 
+ /** Intersection with the interval <tt>x2</tt>; assign result to <tt>isec</tt> */
+ void intersect(interval& isec, const interval& x2)const;
+
+ //==========================================================================
+ //= Representation
+ //==========================================================================
         
         /** Interval as string */
     const std::string as_string()const;
 
 
+ /** What type is the interval?
+\code
+interval.is(closed_bounded); //[x, y] a closed interval
+interval.is(right_open); //[x, y) a right-open interval (also left-closed interval)
+interval.is(left_open); //(x, y] a left-open interval (also right-closed interval)
+interval.is(open_bounded); //(x, y) an open interval
+\endcode
+ */
+ bool is(bound_type bounded)const { return _boundtype == bounded; }
 
- /** First (smallest) element of the interval */
- DomainT first()const;
- /** Last (largest) element of the interval */
- DomainT last()const;
+ /** What bound type is the left interval border?
+\code
+interval.is_left(closed_bounded); //[x, y] or [x, y)
+interval.is_left(open_bounded); //(x, y] or (x, y)
+\endcode
+ */
+ bool is_left(bound_type bounded)const
+ {
+ BOOST_ASSERT(bounded == itl::open_bounded || bounded == itl::closed_bounded);
+ return ((_boundtype & right_open)>>1) == (bounded>>1);
+ }
+
+ /** What bound type is the right interval border?
+\code
+interval.is_right(closed_bounded); //[x, y] or (x, y]
+interval.is_right(open_bounded); //[x, y) or (x, y)
+\endcode
+ */
+ bool is_right(bound_type bounded)const
+ {
+ BOOST_ASSERT(bounded == itl::open_bounded || bounded == itl::closed_bounded);
+ return ((_boundtype & left_open) == (bounded>>1));
+ }
+
+
+ /** There is no gap between <tt>*this</tt> and <tt>x2</tt> but they have no element in common */
+ bool touches(const interval& x2)const;
+
+ /** Maximal element of <tt>*this</tt> is less than the minimal element of <tt>x2</tt> */
+ bool exclusive_less(const interval& x2)const;
+
+ /** Set \c *this interval to from \c low to \c up with boundtype \c bounds */
+ interval& set(const DomainT& low, const DomainT& up, bound_type bounds)
+ { _lwb=low; _upb=up; _boundtype=bounds; return *this; }
 
     /** Transforms the interval to the bound-type <tt>bounded</tt> without
         changing it's content. Requires Integral<domain_type>.

Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
@@ -186,7 +186,7 @@
     void swap(interval_base_map& x) { _map.swap(x._map); }
 
         //==========================================================================
- //= Emptieness, containmnet
+ //= Emptieness, containment
         //==========================================================================
 
     /// clear the map
@@ -196,17 +196,19 @@
     bool empty()const { return _map.empty(); }
 
     //--- contains: set view ---------------------------------------------------
- /// Does the map contain the key element \c x
- bool contains(const DomainT& x)const
+ /** Does the map contain the domain element \c key? */
+ bool contains(const domain_type& key)const
     {
- typename ImplMapT::const_iterator it = _map.find(interval_type(x));
+ typename ImplMapT::const_iterator it = _map.find(interval_type(key));
         return it != _map.end();
     }
 
- //--- contains: map view ------------------------------------------------------
- /// Does the map contain the element pair <tt>x = (key_element,value)</tt>?
- bool contains(const domain_mapping_type& x)const
- { return that()->contains_(value_type(interval_type(x.key), x.data)); }
+ /** Does the map contain the <tt>key_value_pair = (key,value)</tt>? */
+ bool contains(const element_type& key_value_pair)const
+ {
+ return that()->contains_(value_type(interval_type(key_value_pair.key),
+ key_value_pair.data));
+ }
 
     /// Does the map contain all element value pairs represented by the interval-value pair sub?
     bool contains(const value_type& sub)const
@@ -226,20 +228,21 @@
         //= Size
         //==========================================================================
 
- /// Number of intervals which is also the size of the iteration over the map
- size_t interval_count()const { return _map.size(); }
- /// Size of the iteration over this container
- size_t iterative_size()const { return _map.size(); }
-
     /// Number of elements in the map (cardinality).
     size_type cardinality()const;
 
     /// An interval map's size is it's cardinality
     size_type size()const { return cardinality(); }
 
- /// The length of the interval map which is the sum of interval lenghts
+ /// The length of the interval container which is the sum of interval lenghts
     difference_type length()const;
 
+ /// Number of intervals which is also the size of the iteration over the object
+ size_t interval_count()const { return _map.size(); }
+
+ /// Size of the iteration over this container
+ size_t iterative_size()const { return _map.size(); }
+
         //==========================================================================
         //= Range
         //==========================================================================
@@ -252,6 +255,17 @@
     DomainT upper()const
     { return empty()? interval_type().upper() : (*(_map.rbegin())).KEY_VALUE.upper(); }
 
+ /** Smallest element of the map (wrt. the partial ordering on DomainT).
+ first() does not exist for continuous datatypes and open interval
+ bounds. */
+ DomainT first()const { return (*(_map.begin())).KEY_VALUE.first(); }
+
+ /** Largest element of the map (wrt. the partial ordering on DomainT).
+ last() does not exist for continuous datatypes and open interval
+ bounds. */
+ DomainT last()const { return (*(_map.rbegin())).KEY_VALUE.last(); }
+
+
         //==========================================================================
         //= Selection
         //==========================================================================
@@ -268,329 +282,168 @@
         codomain_type operator()(const domain_type& key_value)const
         {
         const_iterator it = _map.find(interval_type(key_value));
- if(it==end())
- return neutron<codomain_type>::value();
- else
- return it->CONT_VALUE;
+ return it==end() ? neutron<codomain_type>::value()
+ : it->CONT_VALUE;
         }
 
 
-//-----------------------------------------------------------------------------
-/** @name G.add: Addition */
-//@{
-
- /// Addition of a base value pair using a Combinator operation.
- /** Addition of a base value pair <tt>x := pair(k,y)</tt> where
- <tt>mapping_type:=pair<DomainT,CodomainT></tt>
-
- This adds (inserts) a value <tt>y</tt> for a single key <tt>k</tt> into the map.
- If <tt>k</tt> already has a value <tt>y0</tt> associated with it, <tt>y0</tt>
- will be 'incremented' by <tt>y</tt> calling <tt>Combinator(y0,y)</tt>.
-
- If Combinator implements addition (+=) associated values will contain sums.
- If Combinator implements max, associated values will contain maximal values and so on.
- */
-
- /// Addition of a value pair using a Combinator operation.
- /** Addition of a value pair <tt>x := pair(I,y)</tt> where <tt>mapping_type:=pair<DomainT,CodomainT></tt>
-
- This adds (inserts) a value <tt>y</tt> an interval <tt>I</tt> into the map.
-
- If no values are associated already within the range of <tt>I</tt>,
- <tt>y</tt> will be associated to that interval.
-
- If there are associated values, in the range of <tt>I</tt>, then all
- those values within the ranges of their intervals,
- are combined by <tt>y</tt>. This is done via the <tt>Combinator</tt> function
- that is passed as template parameter.
-
- If Combinator implements addition (+=) associated values will contain sums.
- If Combinator implements max, associated values will contain maximal values and so on.
- */
- //template<class Combiner>
- //SubType& add(const value_type& x, const Combiner& combine)
- //{ that()->add_(x, combine); return *that(); };
-
+ //==========================================================================
+ //= Addition
+ //==========================================================================
 private:
+ /** Addition of an interval value pair to the map.
+ On overlap an aggregation is performed using functor `Combiner`.
+ This function is not public, because the `codomain_combine` shall be
+ an invariant for all itl maps.*/
     template<class Combiner>
- SubType& add(const value_type& x)
- { that()->template add_<Combiner>(x); return *that(); }
+ SubType& add(const segment_type& interval_value_pair)
+ { that()->template add_<Combiner>(interval_value_pair); return *that(); }
 
 public:
- /// Addition of a base value pair.
- /** Addition of a base value pair <tt>x := pair(k,y)</tt> where <tt>mapping_type:=pair<DomainT,CodomainT></tt>
-
- This adds (inserts) a value <tt>y</tt> for a single key <tt>k</tt> into the map.
- If <tt>k</tt> already has a value <tt>y0</tt> associated with it, <tt>y0</tt>
- will be incremented by <tt>y</tt> using operator <tt>+=</tt>.
-
- Addition and subtraction are reversible as follows:
- <tt>m0=m; m.add(x); m.subtract(x);</tt> implies <tt>m==m0 </tt>
- */
- SubType& add(const domain_mapping_type& x)
- { return add( value_type(interval_type(x.key), x.data) ); }
-
- /// Addition of a base value pair.
- /** Addition of an value pair <tt>x=(I,y)</tt>
-
- This adds (inserts) a value <tt>y</tt> for an interval <tt>I</tt> into the map.
-
- If no values are associated already within the range of <tt>I</tt>,
- <tt>y</tt> will be associated to that interval.
-
- If there are associated values, in the range of <tt>I</tt>, then all
- those values within the ranges of their intervals,
- are incremented by <tt>y</tt>. This is done via operator <tt>+=</tt>
- which has to be implemented for CodomainT.
-
- Insertion and subtraction are reversible as follows:
- <tt>m0=m; m.add(x); m.subtract(x);</tt> implies <tt>m==m0 </tt>
- */
- SubType& add(const value_type& x)
- { that()->template add_<codomain_combine>(x); return *that(); }
-
-//@}
+ /** Addition of a key value pair to the map */
+ SubType& add(const element_type& key_value_pair)
+ { return add( value_type(interval_type(key_value_pair.key), key_value_pair.data) ); }
+
+ /** Addition of an interval value pair to the map. */
+ SubType& add(const segment_type& interval_value_pair)
+ { that()->template add_<codomain_combine>(interval_value_pair); return *that(); }
 
-
-//-----------------------------------------------------------------------------
-/** @name G.sub: Subtraction */
-//@{
-
- /// Subtraction of an base value pair using a Combinator operation
- /** Subtraction of an base value pair <tt>x=(k,y)</tt>
-
- This subtracts a value <tt>y</tt> for a key <tt>k</tt> from the map.
-
- If there is an associated values \c y0, in for <tt>k</tt>,
- \c y0 is combined with \c y by <tt>Combinator(y0,y)</tt>.
-
- A Combinator for subtract is usually an inverse function of
- the corresponding add<Combinator>.
- */
-
- /// Subtraction of an interval value pair using a Combinator operation
- /** Subtraction of an interval value pair <tt>x=(I,y)</tt>
-
- This subtracts a value <tt>y</tt> for an interval <tt>I</tt> from the map.
-
- If there are associated values, in the range of <tt>I</tt>, all
- those values within the ranges of their intervals,
- are decremented by <tt>y</tt>. This is done via the Combinator function
- that is passed a template parameter.
- */
+ //==========================================================================
+ //= Subtraction
+ //==========================================================================
 private:
+ /** Subtraction of an interval value pair from the map.
+ On overlap an aggregation is performed using functor `Combiner`.
+ This function is not public, because the `codomain_combine` shall be
+ an invariant for all itl maps.*/
     template<class Combiner>
- void subtract(const value_type& x)
- { that()->template subtract_<Combiner>(x); }
+ void subtract(const segment_type& interval_value_pair)
+ { that()->template subtract_<Combiner>(interval_value_pair); }
 
 public:
- /// Subtraction of a base value pair.
- /** Subtraction of a base value pair <tt>x=(k,y)</tt> where <tt>mapping_type:=pair<DomainT,CodomainT></tt>
-
- This subtracts a value <tt>y</tt> for a single key <tt>k</tt> from the map.
- If <tt>k</tt> already has a value <tt>y0</tt> associated with it, <tt>y0</tt>
- will be decremented by <tt>y</tt>: <tt>y0 -= y</tt> via operator <tt>-=</tt>
- which has to be implemented for CodomainT. If <tt>y</tt> becomes
- the neutral element CodomainT() <tt>k</tt> will also be removed from
- the map, if the Traits include the property partial_absorber.
-
- Insertion and subtraction are reversible as follows:
- <tt>m0=m; m.add(x); m.subtract(x);</tt> implies <tt>m==m0 </tt>
- */
- SubType& subtract(const domain_mapping_type& x)
+ /** Subtraction of a key value pair from the map */
+ SubType& subtract(const element_type& key_value_pair)
     {
- return subtract( value_type(interval_type(x.key), x.data) );
+ return subtract( value_type(interval_type(key_value_pair.key),
+ key_value_pair.data) );
     }
 
-
- /// Subtraction of an interval value pair
- /** Subtraction of an interval value pair <tt>x=(I,y)</tt>
-
- This subtracts a value <tt>y</tt> for an interval <tt>I</tt> from the map.
-
- If there are associated values, in the range of <tt>I</tt>, all
- those values within the ranges of their intervals,
- are decremented by <tt>y</tt>. This is done usign operator -=.
-
- If <tt>y</tt> becomes the neutral element CodomainT() <tt>k</tt> will
- also be removed from the map, if the Traits include the property
- partial_absorber.
- */
- SubType& subtract(const value_type& x)
+ /** Subtraction of an interval value pair from the map. */
+ SubType& subtract(const segment_type& interval_value_pair)
     {
                 if(Traits::is_total && has_inverse<codomain_type>::value)
- that()->template add_<inverse_codomain_combine>(x);
+ that()->template add_<inverse_codomain_combine>(interval_value_pair);
         else
- that()->template subtract_<inverse_codomain_combine>(x);
+ that()->template subtract_<inverse_codomain_combine>(interval_value_pair);
     
         return *that();
     }
-//@}
-
-
-//-----------------------------------------------------------------------------
-/** @name G.ins&ers: Insertion and Erasure */
-//@{
 
- /// Insertion of a base value pair.
- /** Insertion of a base value pair <tt>x=(k,y)</tt> where <tt>mapping_type:=pair<DomainT,CodomainT></tt>
-
- This inserts a value <tt>y</tt> for a single key <tt>k</tt> into the map.
- Insertion is done only if there is no value \c y0 in the map for key \c k.
+ //==========================================================================
+ //= Insertion
+ //==========================================================================
 
- This is the insertion semantics known from std::map::insert.
- */
- SubType& insert(const domain_mapping_type& x)
+ /** Insertion of a \c key_value_pair into the map. */
+ SubType& insert(const element_type& key_value_pair)
     {
- that()->insert(value_type(interval_type(x.key), x.data));
+ that()->insert(value_type(interval_type(key_value_pair.key),
+ key_value_pair.data));
         return *that();
     }
 
- /// Insertion of an interval value pair
- /** Insertion of an interval value pair <tt>x=(I,y)</tt>
-
- This inserts a value <tt>y</tt> for an interval <tt>I</tt> into the map.
- Insertion is done for all sections of interval \c I that are not yet
- associated with a value.
-
- This is the insertion semantics known from std::map::insert.
-
- \c insert(x) is equivalent to \c add<inplace_identity>(x)
- */
- SubType& insert(const value_type& x)
- { that()->insert_(x); return *that(); }
+ /** Insertion of an \c interval_value_pair into the map. */
+ SubType& insert(const segment_type& interval_value_pair)
+ { that()->insert_(interval_value_pair); return *that(); }
 
 
- SubType& set(const domain_mapping_type& x)
+ /** With <tt>key_value_pair = (k,v)</tt> set value \c v for key \c k */
+ SubType& set(const element_type& key_value_pair)
     {
- that()->set(value_type(interval_type(x.key), x.data));
+ that()->set(value_type(interval_type(key_value_pair.key),
+ key_value_pair.data));
         return *that();
     }
 
- SubType& set(const value_type& x)
+ /** With <tt>interval_value_pair = (I,v)</tt> set value \c v
+ for all keys in interval \c I in the map. */
+ SubType& set(const segment_type& interval_value_pair)
         {
- that()->erase_(x.KEY_VALUE);
- that()->insert_(x);
+ that()->erase_(interval_value_pair.KEY_VALUE);
+ that()->insert_(interval_value_pair);
                 return *that();
         }
 
 
- /// Erase a base value pair from the map
- /** Erase a base value pair <tt>x=(k,y)</tt>.
- This does erase a base value pair <tt>x=(k,y)</tt> form the map, if
- a value \c y is stored for key \c k.
- */
- SubType& erase(const domain_mapping_type& x)
+ //==========================================================================
+ //= Erasure
+ //==========================================================================
+
+ /** Erase a \c key_value_pair from the map. */
+ SubType& erase(const element_type& key_value_pair)
     {
- that()->erase_(value_type(interval_type(x.key), x.data));
+ that()->erase_(value_type(interval_type(key_value_pair.key), key_value_pair.data));
         return *that();
     }
 
- /// Erase a interval value pair from the map
- /** Erase a interval value pair <tt>x=(I,y)</tt>.
- This does erase a interval value pair <tt>x=(I,y)</tt> form the map.
 
- At all places in the range of interval \c I, where a value of \c y
- is stored, it will be erased.
-
- \c erase(x) is equivalent to \c subtract<inplace_erasure>(x)
- */
- SubType& erase(const value_type& x)
- { that()->erase_(x); return *that(); }
+ /** Erase an \c interval_value_pair from the map. */
+ SubType& erase(const segment_type& interval_value_pair)
+ { that()->erase_(interval_value_pair); return *that(); }
 
 
- /// Erase an associated value for a key
- /** Erase an associated value <tt>y</tt> for the key <tt>k</tt> from the map.
+ /** Erase a key value pair for \c key. */
+ SubType& erase(const domain_type& key)
+ { erase(interval_type(key)); return *that(); }
 
- Any value \c y that is stored for key \c k will be erased.
- */
- SubType& erase(const DomainT& x)
- { erase(interval_type(x)); return *that(); }
-
- /// Erase all associated values for an interval
- /** Erase all associated values within the range of the interval <tt>x</tt>
- from the map.
- */
- SubType& erase(const interval_type& x);
 
- /// Erase all associated values for a set of intervals
- /** Erase an entire interval set <tt>x</tt> from the map.
+ /** Erase all value pairs within the range of the
+ interval <tt>inter_val</tt> from the map. */
+ SubType& erase(const interval_type& inter_val);
 
- All values within the scope of the interval set \c x will be erased.
- */
+ /** Erase all value pairs for a set of intervals. */
     template<class SetSubType>
- SubType& erase(const interval_base_set<SetSubType,DomainT,Compare,Interval,Alloc>& x)
+ SubType& erase(const interval_base_set<SetSubType,DomainT,Compare,Interval,Alloc>& eraser)
     {
         typedef interval_base_set<SetSubType,DomainT,Compare,Interval,Alloc> interval_base_set_type;
- for(typename interval_base_set_type::const_iterator x_ = x.begin(); x_ != x.end(); ++x_)
- erase(*x_);
+ for(typename interval_base_set_type::const_iterator interval_ = eraser.begin();
+ interval_ != eraser.end(); ++interval_)
+ erase(*interval_);
     
         return *that();
     }
 
- /// Erase an interval map from this interval map
- /** Erase an entire interval map <tt>x</tt> from the map.
-
- All values within the scope of the interval map \c x will be erased,
- If there are equal values associated in \c *this map.
- */
- SubType& erase(const interval_base_map& x);
-
-//@}
-
-//-----------------------------------------------------------------------------
-/** @name G.sect: Intersection */
-//@{
-
- //JODO DOC Intersection with an interval
- /* Compute the intersection of <tt>*this</tt> and the interval <tt>x</tt>; assign
- result to the interval map <tt>section</tt>.
-
- The result of the intersection with an interval has to be a interval map,
- because a whole set of intervals may exist in <tt>*this</tt> within the range
- of the interval <tt>x</tt>.
-
- Use the intersect function to find intervals or elements in an interval map.
-
- Given
-
- <tt>split_interval_map<int> x, sec; interval<int> i; fill x; fill i</tt>
-
- <tt>x.intersect(sec,i);</tt>
-
- if <tt>i</tt> can be found completely in <tt>x</tt> then
-
- <tt>sec.size()==1</tt> and <tt>(*sec.begin()).first==i</tt>
 
- No find function is implemented, because all find operations can be expressed
- as intersections.
- */
-
-
- /// Intersect the sectant with *this. Pass the result to section.
- template<class SectantT>
- void intersect(interval_base_map& section, const SectantT& sectant)const
- {
- section.clear();
- add_intersection(section, sectant);
- }
+ /** Erase all value pairs from \c *this map that are elements of map \eraser */
+ SubType& erase(const interval_base_map& eraser);
 
- void add_intersection(interval_base_map& section, const domain_type& x)const
- { add_intersection(section, interval_type(x)); }
+ //==========================================================================
+ //= Intersection
+ //==========================================================================
 
- void add_intersection(interval_base_map& section, const domain_mapping_type& x)const
- { add_intersection(section, value_type(interval_type(x.key), x.data)); }
+ //CL Intersect the sectant with *this. Pass the result to section.
+ //template<class SectantT>
+ //void intersect(interval_base_map& section, const SectantT& sectant)const
+ //{
+ // section.clear();
+ // add_intersection(section, sectant);
+ //}
+
+ /** The intersection of \c key in \c *this map is added to \c section.
+ This can also be used to find \c key in \c *this map */
+ void add_intersection(interval_base_map& section, const domain_type& key)const
+ { add_intersection(section, interval_type(key)); }
+
+ /** The intersection of \c key_value_pair in \c *this map is added to \c section. */
+ void add_intersection(interval_base_map& section, const element_type& key_value_pair)const
+ { add_intersection(section, value_type(interval_type(key_value_pair.key), key_value_pair.data)); }
 
- /// Intersection with an interval value pair
- /** Compute an intersection with the value pair \c x=(I,y). The intersection
- operation is progagated to the associated values: For common intervals
- the intersection of associated values is stored in the resulting map
- \c section.
- */
- void add_intersection(interval_base_map& section, const value_type& x)const;
+ /** The intersection of \c interval_value_pair in \c *this map is added to \c section. */
+ void add_intersection(interval_base_map& section, const segment_type& interval_value_pair)const;
 
- void add_intersection(interval_base_map& section, const interval_type& x)const;
+ /** The intersection of \c inter_val with \c *this map is added to \c section. */
+ void add_intersection(interval_base_map& section, const interval_type& inter_val)const;
 
+ /** The intersection of set \c sectant with \c *this map is added to \c section. */
     template
     <
         template
@@ -613,9 +466,7 @@
     }
 
 
- /// Intersection with an interval map
- /** Compute the intersection of <tt>*this</tt> and the interval map <tt>x</tt>;
- assign result to the interval map <tt>section</tt>. */
+ /** The intersection of map \c sectant with \c *this map is added to \c section. */
     template
     <
         template
@@ -633,12 +484,19 @@
     )const;
 
 
+ //==========================================================================
+ //= Symmetric difference
+ //==========================================================================
 
- SubType& flip(const domain_mapping_type& x)
- { return flip(value_type(interval_type(x.key), x.data)); }
+ /** If \c *this map contains \c key_value_pair it is erased, otherwise it is added. */
+ SubType& flip(const element_type& key_value_pair)
+ { return flip(value_type(interval_type(key_value_pair.key), key_value_pair.data)); }
 
- SubType& flip(const value_type& x);
+ /** If \c *this map contains \c interval_value_pair it is erased, otherwise it is added. */
+ SubType& flip(const segment_type& interval_value_pair);
 
+ /** The intersection of \c *this and \c operand is erased from \c *this.
+ The complemenary value pairs are added to \c *this. */
     template
     <
         template
@@ -652,6 +510,9 @@
     SubType& flip(const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand);
 
 
+ //==========================================================================
+ //= Iterator related
+ //==========================================================================
 
     iterator lower_bound(const key_type& interval)
     { return _map.lower_bound(interval); }
@@ -665,10 +526,26 @@
     const_iterator upper_bound(const key_type& interval)const
     { return _map.upper_bound(interval); }
 
+ ///
+ iterator begin() { return _map.begin(); }
+ ///
+ iterator end() { return _map.end(); }
+ ///
+ const_iterator begin()const { return _map.begin(); }
+ ///
+ const_iterator end()const { return _map.end(); }
+ ///
+ reverse_iterator rbegin() { return _map.rbegin(); }
+ ///
+ reverse_iterator rend() { return _map.rend(); }
+ ///
+ const_reverse_iterator rbegin()const { return _map.rbegin(); }
+ ///
+ const_reverse_iterator rend()const { return _map.rend(); }
 
-//-----------------------------------------------------------------------------
-/** @name H.mor: Morphic modifiers */
-
+ //==========================================================================
+ //= Morphisms
+ //==========================================================================
 
     /// Removal of neutral element values
     /** All value pairs \c (I,y) that have neutral elements \c y==codomain_type()
@@ -715,28 +592,6 @@
 //@}
 
 
-/** @name J: Interval iterators
- */
-//@{
- ///
- iterator begin() { return _map.begin(); }
- ///
- iterator end() { return _map.end(); }
- ///
- const_iterator begin()const { return _map.begin(); }
- ///
- const_iterator end()const { return _map.end(); }
- ///
- reverse_iterator rbegin() { return _map.rbegin(); }
- ///
- reverse_iterator rend() { return _map.rend(); }
- ///
- const_reverse_iterator rbegin()const { return _map.rbegin(); }
- ///
- const_reverse_iterator rend()const { return _map.rend(); }
-//@}
-
-
 
 /** @name K: Selection by predicates
     */
@@ -767,16 +622,6 @@
 //@}
     
 
- /* Smallest element of the map (wrt. the partial ordering on DomainT).
- first() does not exist for continuous datatypes and open interval bounds.
- */
- DomainT first()const { return (*(_map.begin())).KEY_VALUE.first(); } // JODO NONCONT
-
- /* Largest element of the map (wrt. the partial ordering on DomainT).
- first() does not exist for continuous datatypes and open interval bounds.
- */
- DomainT last()const { return (*(_map.rbegin())).KEY_VALUE.last(); } // JODO NONCONT
-
 
     /* Sum of associated elements of the map
         <b>Nicht getestet</b> */
@@ -913,7 +758,7 @@
 void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
     ::add_intersection(interval_base_map& section,
                     const typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
- ::value_type& sectant)const
+ ::segment_type& sectant)const
 {
         if(Traits::is_total)
         {
@@ -983,7 +828,7 @@
     class DomainT, class CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc
>
 SubType& interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
- ::flip(const value_type& x)
+ ::flip(const segment_type& interval_value_pair)
 {
     // That which is common shall be subtracted
         // That which is not shall be added
@@ -996,7 +841,7 @@
         }
         if(Traits::is_total && !Traits::absorbs_neutrons)//JODO
         {
- (*that()) += x;
+ (*that()) += interval_value_pair;
                 FORALL(typename ImplMapT, it_, _map)
                         it_->CONT_VALUE = neutron<codomain_type>::value();
 
@@ -1006,13 +851,13 @@
                 return *that();
         }
 
- interval_type span = x.KEY_VALUE;
+ interval_type span = interval_value_pair.KEY_VALUE;
 
     typename ImplMapT::const_iterator fst_it = _map.lower_bound(span);
     typename ImplMapT::const_iterator end_it = _map.upper_bound(span);
 
         interval_type covered, left_over, common_interval;
- const codomain_type& x_value = x.CONT_VALUE;
+ const codomain_type& x_value = interval_value_pair.CONT_VALUE;
         typename ImplMapT::const_iterator it = fst_it;
     while(it != end_it)
     {

Modified: sandbox/itl/boost/itl/interval_base_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_set.hpp 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
@@ -23,57 +23,7 @@
 namespace boost{namespace itl
 {
 
-//JODO update documentation (all invterval containers; template parameters have changed)
 /// Implements a set as a set of intervals (base class)
-/**
- Abstract template-class <b>interval_base_set</b>
- implements a set as a set of intervals
-
- Template parameter <b>DomainT</b>: The set's domain-type. Type of the
- set's elements.
-
- Suitable as domain types are all datatypes that posess a partial order.
- In particular all discrete atomic datatypes like <tt>int, short, long</tt> and
- atomic pseudo-continuous datatypes <tt>float, double</tt> may be instantiated.
-
- Template parameter <b>Interval=itl::interval</b>: Type of interval used
- to implement the set. The default <b>itl::interval</b> uses the
- interval class template that comes with this library. Own implementation of interval
- classes are possible (but not trivial).
-
- <b>interval_base_set</b> implements a set <tt>set<DomainT></tt> as a set of intervals
- <tt>set<interval<DomainT>></tt>.
-
- interval_base_set<DomainT> can thus be used like a set. As it is known from mathematics
- the union over a set of intervls is a set itself.
-
- <b>Class <tt>interval_base_set</tt> yields the following benefits: </b>
-
- <ul>
- <li>
- A set of intervals is conceived as a set. The complexity involved with
- operations on intervals and sets of intervals is encapsulated.
- The user of the class who
- wants to perform set operations on sets of intervals is no more concerned
- with questions of overlapping, joining and bordering intervals.
- <li>
- <b>interval_base_set</b> gives an efficient implementation of sets consisting
- of larger contiguous chunks. Very large, even uncountably infinite sets of
- elements can be represented in a compact way and handled efficiently.
- </ul>
-
- <b>Restrictions: </b>
-
- A small number of functions can only be used for <b>discrete</b> domain datatypes
- (<tt>short, int, Date</tt> etc.) that implement operators <tt>++</tt> and <tt>--</tt>.
-
- These functions are tagged in the documentation. Using such functions
- for continuous domain datatypes yields compiletime errors. C.f. getting
- the <tt>first()</tt> element of a left open interval makes sense for intervals of
- int but not for intervals of double.
-
- @author Joachim Faulhaber
-*/
 template
 <
     typename SubType,
@@ -192,7 +142,7 @@
     void swap(interval_base_set& x) { _set.swap(x._set); }
 
         //==========================================================================
- //= Emptieness, containmnet
+ //= Emptieness, containment
         //==========================================================================
 
     /// sets the container empty
@@ -233,47 +183,61 @@
                 return Interval_Set::is_contained_in(*this, super);
         }
 
+ //==========================================================================
+ //= Size
+ //==========================================================================
 
+ /** Number of elements in the set (cardinality).
+ Infinite for continuous domain datatyps */
+ size_type cardinality()const;
 
- /// Find the interval value pair, that contains element \c x
- const_iterator find(const DomainT& x)const
- {
- typename ImplSetT::const_iterator it = this->_map.find(interval_type(x));
- return it;
- }
+ /// An interval set's size is it's cardinality
+ size_type size()const { return cardinality(); }
 
+ /// The length of the interval container which is the sum of interval lenghts
+ difference_type length()const;
 
-/** @name E: Bounds and other selectors
- */
-//@{
- /// lower bound of all intervals in the set
+ /// Number of intervals which is also the size of the iteration over the object
+ std::size_t interval_count()const { return _set.size(); }
+
+ /// Size of the iteration over this container
+ std::size_t iterative_size()const { return _set.size(); }
+
+ //==========================================================================
+ //= Range
+ //==========================================================================
+
+ /// lower bound of all intervals in the object
     DomainT lower()const
     { return empty()? interval_type().lower() : (*(_set.begin())).lower(); }
- /// upper bound of all intervals in the set
+ /// upper bound of all intervals in the object
     DomainT upper()const
     { return empty()? interval_type().upper() : (*(_set.rbegin())).upper(); }
 
- iterator lower_bound(const value_type& interval)
- { return _set.lower_bound(interval); }
-
- iterator upper_bound(const value_type& interval)
- { return _set.upper_bound(interval); }
-
- const_iterator lower_bound(const value_type& interval)const
- { return _set.lower_bound(interval); }
+ /** Smallest element of the set (wrt. the partial ordering on DomainT).
+ first() does not exist for continuous datatypes and open interval
+ bounds. */
+ DomainT first()const { return (*(_set.begin())).first(); }
 
- const_iterator upper_bound(const value_type& interval)const
- { return _set.upper_bound(interval); }
+ /** Largest element of the set (wrt. the partial ordering on DomainT).
+ last() does not exist for continuous datatypes and open interval
+ bounds. */
+ DomainT last()const { return (*(_set.rbegin())).last(); }
 
- /// number of intervals
- std::size_t interval_count()const { return _set.size(); }
- std::size_t iterative_size()const { return _set.size(); }
-//@}
+ //==========================================================================
+ //= Selection
+ //==========================================================================
 
+ /// Find the interval value pair, that contains element \c x
+ const_iterator find(const DomainT& x)const
+ {
+ typename ImplSetT::const_iterator it = this->_map.find(interval_type(x));
+ return it;
+ }
 
-//-----------------------------------------------------------------------------
-/** @name G.add: Addition */
-//@{
+ //==========================================================================
+ //= Addition
+ //==========================================================================
 
     /// Add a single element \c x to the set
     SubType& add(const DomainT& x)
@@ -283,11 +247,9 @@
     SubType& add(const value_type& x)
     { that()->add_(x); return *that(); }
 
-//@}
-
-//-----------------------------------------------------------------------------
-/** @name G.sub: Subtraction */
-//@{
+ //==========================================================================
+ //= Subtraction
+ //==========================================================================
 
     /// Subtract a single element \c x from the set
     SubType& subtract(const DomainT& x)
@@ -297,19 +259,10 @@
     SubType& subtract(const value_type& x)
     { that()->subtract_(x); return *that(); }
 
- ///// Subtract a single element \c x from the set
- //interval_base_set& operator -= (const DomainT& x)
- //{ subtract(x); return *this; }
-
- ///// Subtract an interval of elements \c x from the set
- //interval_base_set& operator -= (const value_type& x)
- //{ that()->subtract(x); return *this; }
-
-//@}
+ //==========================================================================
+ //= Insertion, erasure
+ //==========================================================================
 
-//-----------------------------------------------------------------------------
-/** @name G.ins&ers: Insertion and erasure */
-//@{
     /// Insert an element \c x into the set
     SubType& insert(const DomainT& x)
     { return add(interval_type(x)); }
@@ -325,28 +278,11 @@
     /// Erase an interval of element \c x from the set
     SubType& erase(const value_type& x)
     { return subtract(x); }
-//@}
 
-//-----------------------------------------------------------------------------
-/** @name G.sect: Intersection */
-//@{
-
- /*JODO DOC Intersection with interval x; The intersection is assigned to <tt>section</tt>.
-
- Intersection also serves a generalized <tt>find</tt>-function to search
- for intervals in the set:
-
- <tt>ItvSetT<int> x, sec; interval<int> i; fill x; fill i;</tt>
-
- <tt>x.intersect(sec,i);</tt>
-
- If <tt>i</tt> is an interval of <tt>x</tt>, then
-
- <tt>sec.nOfIntervals()==1</tt> and <tt>*(sec.begin())==x</tt>
- */
- //CL void intersect(interval_base_set& section, const value_type& x)const;
+ //==========================================================================
+ //= Intersection
+ //==========================================================================
 
- //JODO DOC; welche intersect-varianten kann ich ganz los werden.
     void add_intersection(interval_base_set& section, const domain_type& x)const
         { add_intersection(section, interval_type(x)); }
 
@@ -366,6 +302,10 @@
     )const;
 
 
+ //==========================================================================
+ //= Symmetric difference
+ //==========================================================================
+
     SubType& flip(const domain_type& x)
         { return flip(interval_type(x)); }
 
@@ -379,32 +319,10 @@
>
     SubType& flip(const IntervalSet<DomainT,Compare,Interval,Alloc>& operand);
 
+ //==========================================================================
+ //= Iterator related
+ //==========================================================================
 
- //JODO doku
- /** Perform intersection of <tt>*this</tt> and <tt>x</tt>; assign result
- to <tt>section</tt>
- */
-
- /** Perform intersection of <tt>*this</tt> and <tt>x</tt>; assign result
- to <tt>*this</tt>
-
- Aufruf <tt>x &= y</tt> bedeutet <tt>x = x geschnitten mit y </tt>
- */
-//@}
-
-//-----------------------------------------------------------------------------
-/** @name G.jodo: JODO */
-
- /// Join bordering intervals
- interval_base_set& join();
-
-//@}
-
-
-
-/** @name I: Interval iterators
- */
-//@{
     ///
     iterator begin() { return _set.begin(); }
     ///
@@ -421,48 +339,28 @@
     const_reverse_iterator rbegin()const { return _set.rbegin(); }
     ///
     const_reverse_iterator rend()const { return _set.rend(); }
-//@}
 
+ iterator lower_bound(const value_type& interval)
+ { return _set.lower_bound(interval); }
 
+ iterator upper_bound(const value_type& interval)
+ { return _set.upper_bound(interval); }
 
-/** @name S: String representation
- */
-//@{
- /// Interval-set as string
- const std::string as_string()const
- { std::string res(""); const_FOR_IMPL(it) res += (*it).as_string(); return res; }
-//@}
+ const_iterator lower_bound(const value_type& interval)const
+ { return _set.lower_bound(interval); }
 
-
-/** @name T: For discrete domain datatypes only that implement operators <tt>++</tt>
- and <tt>--</tt>
- */
-//@{
- /** Smallest element of the set (wrt. the partial ordering on DomainT).
- first() does not exist for continuous datatypes and open interval bounds.
- */
- DomainT first()const { return (*(_set.begin())).first(); } // JODO NONCONT
+ const_iterator upper_bound(const value_type& interval)const
+ { return _set.upper_bound(interval); }
 
- /** Largest element of the set (wrt. the partial ordering on DomainT).
- first() does not exist for continuous datatypes and open interval bounds.
- */
- DomainT last()const { return (*(_set.rbegin())).last(); } // JODO NONCONT
 
         //==========================================================================
- //= Size
+ //= Morphisms
         //==========================================================================
+
+ /** Join bordering intervals */
+ interval_base_set& join();
 
- /** Number of elements in the set (cardinality).
- Infinite for continuous domain datatyps */
- size_type cardinality()const;
-
- /// An interval set's size is it's cardinality
- size_type size()const { return cardinality(); }
-
- difference_type length()const;
-
- /** Set interval bounds to the type <tt>bt</tt> for intervals in the set.
-
+ /** Set interval bounds to the type <tt>bt</tt> for intervals in the set.
         Interval bounds of different types are created by opeations on
         interval sets. This function allows to reset them uniformly without,
         of course, changing their value. This is only possible for discrete
@@ -470,8 +368,19 @@
     */
         void uniform_bounds(itl::bound_type bounded);
 
-//@}
 
+ //==========================================================================
+ //= Representation
+ //==========================================================================
+
+ /** Interval container's string representation */
+ const std::string as_string()const
+ { std::string res(""); const_FOR_IMPL(it) res += (*it).as_string(); return res; }
+
+
+ //==========================================================================
+ //= Algorithm unifiers
+ //==========================================================================
 
     template<typename IteratorT>
     static const key_type& key_value(IteratorT& value_){ return (*value_); }

Modified: sandbox/itl/boost/itl/interval_maps.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_maps.hpp (original)
+++ sandbox/itl/boost/itl/interval_maps.hpp 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
@@ -24,7 +24,7 @@
 
 
 //==============================================================================
-//= Emptieness, containmnet
+//= Emptieness, containment
 //==============================================================================
 template
 <

Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
@@ -164,7 +164,7 @@
 
 public:
         //==========================================================================
- //= Emptieness, containmnet
+ //= Emptieness, containment
         //==========================================================================
 
     /** Checks if a key element is in the map */
@@ -188,13 +188,6 @@
 
     size_t cardinality()const { return size(); }
 
- void absorb_neutrons()
- {
- //content_is_neutron<key_type, data_type> neutron_dropper;
- if(!Traits::absorbs_neutrons)
- erase_if(content_is_neutron<value_type>());
- }
-
     std::pair<iterator,bool> insert(const value_type& value_pair)
     {
         if(Traits::absorbs_neutrons && value_pair.CONT_VALUE == codomain_combine::neutron())
@@ -234,6 +227,29 @@
         Erase only if, the exact value content \c val is stored at key \key. */
     size_type erase(const value_type& value);
 
+
+ //==========================================================================
+ //= Morphisms
+ //==========================================================================
+
+ void absorb_neutrons()
+ {
+ //content_is_neutron<key_type, data_type> neutron_dropper;
+ if(!Traits::absorbs_neutrons)
+ erase_if(content_is_neutron<value_type>());
+ }
+
+ //==========================================================================
+ //= Representaion
+ //==========================================================================
+
+ /** Represent this map as string */
+ std::string as_string()const;
+
+ //==========================================================================
+ //= Algorithm unifiers
+ //==========================================================================
+
     /** \c key_value allows for a uniform access to \c key_values which is
         is used for common algorithms on sets and maps. */
     template<typename IteratorT>
@@ -267,9 +283,6 @@
     template<class Predicate>
     map& assign_if(const map& src, const Predicate&);
 
- /** Represent this map as string */
- std::string as_string()const;
-
 private:
     template<class Combiner>
     map& add(const value_type& value_pair);
@@ -403,7 +416,7 @@
         if(!Set::common_range(common_lwb_, common_upb_, sectant, *this))
         return;
 
- typename const_iterator sec_ = common_lwb_;
+ const_iterator sec_ = common_lwb_;
         while(sec_ != common_upb_)
         {
                 const_iterator it_ = find(sec_->KEY_VALUE);

Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp (original)
+++ sandbox/itl/boost/itl/set.hpp 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
@@ -106,7 +106,7 @@
 
 public:
         //==========================================================================
- //= Emptieness, containmnet
+ //= Emptieness, containment
         //==========================================================================
 
     /// Checks if the element \c x is in the set
@@ -201,7 +201,7 @@
 
 template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
 void set<DomainT,Compare,Alloc>
- ::add_intersection(set& section, const typename set& sectant)const
+ ::add_intersection(set& section, const set& sectant)const
 {
     const_iterator common_lwb_;
     const_iterator common_upb_;

Modified: sandbox/itl/libs/itl/doc/interface.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/interface.qbk (original)
+++ sandbox/itl/libs/itl/doc/interface.qbk 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
@@ -461,6 +461,8 @@
 [[['*Range*]] [ ] [ ] [ ] [ ] [ ] [ ] [ ]]
 [[`domain_type T::lower()const`] [1] [1] [1] [ ] [ ] [ ] [ ]]
 [[`domain_type T::upper()const`] [1] [1] [1] [ ] [ ] [ ] [ ]]
+[[`domain_type T::first()const`] [1] [1] [1] [ ] [ ] [ ] [ ]]
+[[`domain_type T::last()const`] [1] [1] [1] [ ] [ ] [ ] [ ]]
 [[['*Selection*]] [ ] [ ] [ ] [ ] [ ] [ ] [ ]]
 [[`J T::find(const domain_type&)`] [ ] [2] [2] [2] [2] [2] [2]]
 [[`codomain_type& operator[] (const domain_type&)`][ ] [ ] [??] [ ] [1] [ ] [1]]

Modified: sandbox/itl/libs/itl_xt/test/itvmaptester.h
==============================================================================
--- sandbox/itl/libs/itl_xt/test/itvmaptester.h (original)
+++ sandbox/itl/libs/itl_xt/test/itvmaptester.h 2009-02-11 16:13:40 EST (Wed, 11 Feb 2009)
@@ -472,8 +472,7 @@
     erasureComplement -= erasureDomain;
 
     ItvMapTV xxSect;
- //xx.intersect(xxSect, erasureComplement);
- xx.intersect(xxSect, erasureComplement);
+ xx.add_intersection(xxSect, erasureComplement);
 
     if(! is_element_equal(xxResid, xxSect) ) {
         x = xx; y = erasureDomain; xDom_minus_y = erasureComplement;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk