$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r50787 - in sandbox/itl: boost/itl boost/itl/type_traits boost/itl_xt boost/validate boost/validate/laws libs/itl/test libs/itl/test/test_interval_map libs/itl/test/test_interval_map_mixed libs/itl/test/test_interval_set libs/itl/test/test_interval_set_mixed libs/itl/test/test_separate_interval_set libs/itl/test/test_split_interval_map libs/itl/test/test_split_interval_set libs/itl_xt/test/meta_functors libs/validate/example/labat_single libs/validate/example/labatea
From: afojgo_at_[hidden]
Date: 2009-01-26 11:30:36
Author: jofaber
Date: 2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
New Revision: 50787
URL: http://svn.boost.org/trac/boost/changeset/50787
Log:
Added code: Added symmetric difference T::flip, op ^= and ^. Added law based test InplaceFlip.
Refactored: Replaced inplace_star by inplace_et.Refactored. 
Stable {msvc-9.0(r&d), partly congcc-4.3-a7}  
Text files modified: 
   sandbox/itl/boost/itl/functors.hpp                                                         |    38 +                                       
   sandbox/itl/boost/itl/interval.hpp                                                         |     2                                         
   sandbox/itl/boost/itl/interval_base_map.hpp                                                |   183 +++++++++                               
   sandbox/itl/boost/itl/interval_base_set.hpp                                                |   139 +++++++                                 
   sandbox/itl/boost/itl/interval_map.hpp                                                     |     2                                         
   sandbox/itl/boost/itl/interval_maps.hpp                                                    |   784 +-------------------------------------- 
   sandbox/itl/boost/itl/interval_sets.hpp                                                    |   220 ----------                              
   sandbox/itl/boost/itl/map.hpp                                                              |    28 +                                       
   sandbox/itl/boost/itl/map_algo.hpp                                                         |    48 ++                                      
   sandbox/itl/boost/itl/operators.hpp                                                        |    88 ++++                                    
   sandbox/itl/boost/itl/set.hpp                                                              |    37 +                                       
   sandbox/itl/boost/itl/set_algo.hpp                                                         |    14                                         
   sandbox/itl/boost/itl/split_interval_map.hpp                                               |     2                                         
   sandbox/itl/boost/itl/type_traits/is_combinable.hpp                                        |    72 ++-                                     
   sandbox/itl/boost/itl_xt/mapgentor.hpp                                                     |     2                                         
   sandbox/itl/boost/itl_xt/numbergentor.hpp                                                  |     2                                         
   sandbox/itl/boost/itl_xt/random.hpp                                                        |     2                                         
   sandbox/itl/boost/itl_xt/setgentor.hpp                                                     |     2                                         
   sandbox/itl/boost/validate/laws/set_laws.h                                                 |    86 ++++                                    
   sandbox/itl/boost/validate/typevalidater.h                                                 |    81 ++-                                     
   sandbox/itl/libs/itl/test/test_interval_map/test_interval_map_shared.cpp                   |     8                                         
   sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp              |    17                                         
   sandbox/itl/libs/itl/test/test_interval_map_shared.hpp                                     |    76 +++                                     
   sandbox/itl/libs/itl/test/test_interval_set/test_interval_set_shared.cpp                   |     8                                         
   sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp              |    32 +                                       
   sandbox/itl/libs/itl/test/test_interval_set_shared.hpp                                     |    53 ++                                      
   sandbox/itl/libs/itl/test/test_quantifier_map_shared.hpp                                   |     4                                         
   sandbox/itl/libs/itl/test/test_separate_interval_set/test_separate_interval_set_shared.cpp |     4                                         
   sandbox/itl/libs/itl/test/test_split_interval_map/test_split_interval_map_shared.cpp       |     4                                         
   sandbox/itl/libs/itl/test/test_split_interval_set/test_split_interval_set_shared.cpp       |     4                                         
   sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp                               |    17                                         
   sandbox/itl/libs/validate/example/labat_single/labat_single.cpp                            |    17                                         
   sandbox/itl/libs/validate/example/labatea/labatea.cpp                                      |     4                                         
   33 files changed, 985 insertions(+), 1095 deletions(-)
Modified: sandbox/itl/boost/itl/functors.hpp
==============================================================================
--- sandbox/itl/boost/itl/functors.hpp	(original)
+++ sandbox/itl/boost/itl/functors.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -154,8 +154,32 @@
                 static Type neutron() { return boost::itl::neutron<Type>::value(); }
     };
 
+    // ------------------------------------------------------------------------
+    template <typename Type> struct inplace_et
+        : public neutron_based_inplace_combine<Type>
+    {
+        typedef Type type;
+
+        void operator()(Type& object, const Type& operand)const
+        { object &= operand; }
+    };
+
     template<>
-    inline std::string unary_template_to_string<inplace_bit_xor>::apply() { return "b^="; }
+    inline std::string unary_template_to_string<inplace_et>::apply() { return "&="; }
+
+    // ------------------------------------------------------------------------
+    template <typename Type> struct inplace_hat
+        : public neutron_based_inplace_combine<Type>
+    {
+        typedef Type type;
+        void operator()(Type& object, const Type& operand)const
+        { object ^= operand; }
+
+		static Type neutron() { return boost::itl::neutron<Type>::value(); }
+    };
+
+    template<>
+    inline std::string unary_template_to_string<inplace_hat>::apply() { return "^="; }
 
     // ------------------------------------------------------------------------
     template <typename Type> struct inserter
@@ -188,13 +212,13 @@
         : public neutron_based_inplace_combine<Type>
     {
         void operator()(Type& object, const Type& operand)const
-        { object &= operand; }
+        { object *= operand; }
 
                 static Type neutron() { return boost::itl::neutron<Type>::value(); }
     };
 
     template<>
-    inline std::string unary_template_to_string<inplace_star>::apply() { return "&="; }
+    inline std::string unary_template_to_string<inplace_star>::apply() { return "*="; }
 
     // ------------------------------------------------------------------------
     template <typename Type> struct inplace_slash
@@ -262,6 +286,14 @@
         { typedef itl::inplace_bit_add<Type> type; };
 
         template<class Type> 
+	struct inverse<itl::inplace_et<Type> >
+	{ typedef itl::inplace_hat<Type> type; };
+
+	template<class Type> 
+	struct inverse<itl::inplace_hat<Type> >
+	{ typedef itl::inplace_et<Type> type; };
+
+	template<class Type> 
         struct inverse<itl::inplace_bit_and<Type> >
         { typedef itl::inplace_bit_xor<Type> type; };
 
Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp	(original)
+++ sandbox/itl/boost/itl/interval.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -457,7 +457,7 @@
      [c  d) : right_over
 \endcode
         */
-    void left_subtract(interval& rsur, const interval& x2)const;
+    void left_subtract(interval& right_over, const interval& x2)const;
 
     /** subtract \c x2 from \c *this interval on it's right side. Assign the difference 
                 to \c left_over. The result \c left_over is the part of \c *this left of \c x2.
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-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -142,7 +142,7 @@
     class Traits = itl::neutron_absorber,
     ITL_COMPARE Compare  = ITL_COMPARE_INSTANCE(std::less, DomainT),
         ITL_COMBINE Combine  = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT),
-	ITL_SECTION Section  = ITL_SECTION_INSTANCE(itl::inplace_star, CodomainT), 
+	ITL_SECTION Section  = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), 
     template<class,ITL_COMPARE>class Interval = itl::interval,
     ITL_ALLOC   Alloc    = std::allocator
 >
@@ -196,6 +196,8 @@
         typedef typename inverse<codomain_combine>::type inverse_codomain_combine;
     /// Intersection functor for codomain values
     typedef ITL_SECTION_CODOMAIN(Section,CodomainT) codomain_intersect;
+	/// Inverse Combine functor for codomain value intersection
+	typedef typename inverse<codomain_intersect>::type inverse_codomain_intersect;
 
     /// Comparison functor for intervals which are keys as well
     typedef exclusive_less<interval_type> interval_compare;
@@ -690,8 +692,26 @@
         const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& sectant
     )const;
 
-//@}
-        
+
+
+    SubType& flip(const domain_mapping_type& x){ flip(value_type(x)); }
+
+    SubType& flip(const value_type& x);
+
+    template
+    <
+        template
+        <    
+            class DomT, class CodomT, class Trts, 
+            ITL_COMPARE Comp, ITL_COMBINE Combi, ITL_SECTION Sect,
+            template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc
+        >
+        class IntervalMap
+    >
+    SubType& flip(const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand);
+
+
+
     iterator lower_bound(const key_type& interval)
     { return _map.lower_bound(interval); }
 
@@ -995,7 +1015,7 @@
                 for(typename ImplMapT::const_iterator it=fst_it; it != end_it; it++) 
                 {
                         interval_type common_interval; 
-			(*it).KEY_VALUE.intersect(common_interval, sectant_interval);
+			(*it).KEY_VALUE.intersect(common_interval, sectant_interval); //JODO refa: reduce intersect variants
 
                         if(!common_interval.empty())
                         {
@@ -1037,6 +1057,161 @@
 
 
 
+
+
+
+
+template 
+<
+    class SubType,
+    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)
+{
+    // That which is common shall be subtracted
+	// That which is not shall be added
+	// So x has to be 'complementary added' or flipped
+
+	if(Traits::emits_neutrons && Traits::absorbs_neutrons)
+	{
+		clear();
+		return *that();
+	}
+	if(Traits::emits_neutrons && !Traits::absorbs_neutrons)//JODO
+	{
+		(*that()) += x;
+		FORALL(typename ImplMapT, it_, _map)
+			it_->CONT_VALUE = neutron<codomain_type>::value();
+
+		if(!is_interval_splitter<SubType>::value)
+			join();
+
+		return *that();
+	}
+
+	interval_type span = x.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;
+	typename ImplMapT::const_iterator it = fst_it;
+    while(it != end_it) 
+    {
+		const codomain_type& co_value = it->CONT_VALUE;
+		covered = (*it++).KEY_VALUE; 
+		//[a      ...  : span
+		//     [b ...  : covered
+		//[a  b)       : left_over
+		span.right_subtract(left_over, covered);
+
+		//That which is common ...
+		common_interval = span & covered;
+		if(!common_interval.empty())
+		{
+			// ... shall be subtracted
+			if(is_set<codomain_type>::value)
+			{
+				codomain_type common_value = x_value;
+				inverse_codomain_intersect()(common_value, co_value);
+				erase(common_interval);
+				add(value_type(common_interval, common_value));
+
+				//JODO flip<inverse_codomain_intersect>(value_type(common_interval, co_value));
+			}
+			else
+				subtract(value_type(common_interval, co_value));
+		}
+
+		add(value_type(left_over, x_value)); //That which is not shall be added
+		// Because this is a collision free addition I don't have to distinguish codomain_types.
+
+		//...      d) : span
+		//... c)      : (*it); span.left_subtract(*it);
+		//     [c  d) : span'
+		span.left_subtract(covered);
+    }
+
+	//If span is not empty here, it is not in the set so it shall be added
+	add(value_type(span, x_value));
+
+	if(Traits::emits_neutrons && !Traits::absorbs_neutrons) //JODO
+		FORALL(typename ImplMapT, it_, _map)
+			it_->CONT_VALUE = neutron<codomain_type>::value();
+
+	return *that();
+}
+
+
+
+template 
+<
+    class SubType,
+    class DomainT, class CodomainT, class Traits, 
+    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, 
+    template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc
+>
+    template
+    <
+        template
+        <    
+            class DomT, class CodomT, class Trts, 
+            ITL_COMPARE Comp, ITL_COMBINE Combi, ITL_SECTION Sect,
+            template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc
+        >
+        class IntervalMap
+    >
+SubType& interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
+    ::flip(const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand)
+{
+    typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> operand_type;
+
+	if(Traits::emits_neutrons && Traits::absorbs_neutrons)
+	{
+		clear();
+		return *that();
+	}
+	if(Traits::emits_neutrons && !Traits::absorbs_neutrons)//JODO
+	{
+		(*that()) += operand;
+		FORALL(typename ImplMapT, it_, _map)
+			it_->CONT_VALUE = neutron<codomain_type>::value();
+
+		if(!is_interval_splitter<SubType>::value)
+			join();
+
+		return *that();
+	}
+
+    typename operand_type::const_iterator common_lwb;
+    typename operand_type::const_iterator common_upb;
+
+    if(!Set::common_range(common_lwb, common_upb, operand, *this))
+		return *that() += operand;
+
+    typename operand_type::const_iterator it = operand.begin();
+
+	// All elements of operand left of the common range are added
+    while(it != common_lwb)
+        add(*it++);
+	// All elements of operand in the common range are symmertrically subtracted
+    while(it != common_upb)
+        flip(*it++);
+	// All elements of operand right of the common range are added
+    while(it != operand.end())
+        add(*it++);
+
+	if(Traits::emits_neutrons && !Traits::absorbs_neutrons) //JODO
+		FORALL(typename ImplMapT, it_, _map)
+			it_->CONT_VALUE = neutron<codomain_type>::value();
+
+	return *that();
+}
+
+
+
 template 
 <
     class SubType,
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-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -327,8 +327,38 @@
     //CL void intersect(interval_base_set& section, const value_type& x)const;
 
     //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)); }
+
     void add_intersection(interval_base_set& section, const value_type& x)const;
 
+
+	template
+    <
+        template<class DomT, ITL_COMPARE Comp, 
+		         template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc>
+        class IntervalSet
+    >
+    void add_intersection
+    (
+        interval_base_set& intersection,
+        const IntervalSet<DomainT,Compare,Interval,Alloc>& sectant
+    )const;
+
+
+    SubType& flip(const domain_type& x){ flip(interval_type(x)); }
+
+    SubType& flip(const value_type& x);
+
+	template
+    <
+        template<class DomT, ITL_COMPARE Comp, 
+		         template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc>
+        class IntervalSet
+    >
+    SubType& flip(const IntervalSet<DomainT,Compare,Interval,Alloc>& operand);
+
+
     //JODO doku
     /** Perform intersection of <tt>*this</tt> and <tt>x</tt>; assign result
         to <tt>section</tt>
@@ -538,9 +568,116 @@
 }
 
 
+template<class SubType, 
+         class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
+    template
+    <
+        template<class DomT, ITL_COMPARE Comp,
+		         template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc>
+        class IntervalSet
+    >
+void interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+    ::add_intersection
+(
+    interval_base_set& intersection,
+    const IntervalSet<DomainT,Compare,Interval,Alloc>& operand
+)const
+{
+    typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
+
+    if(operand.empty())
+		return;
+
+    typename operand_type::const_iterator common_lwb;
+    typename operand_type::const_iterator common_upb;
+
+    if(!Set::common_range(common_lwb, common_upb, operand, *this))
+        return;
+
+    typename operand_type::const_iterator it = common_lwb;
+    while(it != common_upb)
+        add_intersection(intersection, *it++);
+}
+
+
+template<class SubType,
+         class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
+SubType& interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+	::flip(const value_type& x)
+{
+    // That which is common shall be subtracted
+	// That which is not shall be added
+	// So x has to be 'complementary added' or flipped
+	interval_type span = x;
+    typename ImplSetT::const_iterator fst_ = _set.lower_bound(span);
+    typename ImplSetT::const_iterator end_ = _set.upper_bound(span);
+
+	interval_type covered, left_over;
+	typename ImplSetT::const_iterator it_ = fst_;
+    while(it_ != end_) 
+    {
+		covered = *it_++; 
+		//[a      ...  : span
+		//     [b ...  : covered
+		//[a  b)       : left_over
+		span.right_subtract(left_over, covered);
+		subtract(span & covered); //That which is common shall be subtracted
+		add(left_over);                //That which is not shall be added
+
+		//...      d) : span
+		//... c)      : (*it); span.left_subtract(*it);
+		//     [c  d) : span'
+		span.left_subtract(covered);
+    }
+
+	//If span is not empty here, it is not in the set so it shall be added
+	add(span);
+	return *that();
+}
+
+
+template
+<
+	class SubType, 
+    class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
+    template
+    <template<class DomT, ITL_COMPARE Comp, template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc>
+    class IntervalSet
+>
+SubType& interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
+    ::flip(const IntervalSet<DomainT,Compare,Interval,Alloc>& operand)
+{
+    typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
+
+    if(operand.empty())
+		return *that();
+
+    typename operand_type::const_iterator common_lwb;
+    typename operand_type::const_iterator common_upb;
+
+    if(!Set::common_range(common_lwb, common_upb, operand, *this))
+		return *that() += operand;
+
+    typename operand_type::const_iterator it = operand.begin();
+
+	// All elements of operand left of the common range are added
+    while(it != common_lwb)
+        add(*it++);
+	// All elements of operand in the common range are symmertrically subtracted
+    while(it != common_upb)
+        flip(*it++);
+	// All elements of operand right of the common range are added
+    while(it != operand.end())
+        add(*it++);
+
+	return *that();
+}
+
+
 template<class SubType,
          class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
-interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& interval_base_set<SubType,DomainT,Compare,Interval,Alloc>::join()
+interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& 
+interval_base_set<SubType,DomainT,Compare,Interval,Alloc>::join()
 {
     iterator it=_set.begin();
     if(it==_set.end()) 
Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp	(original)
+++ sandbox/itl/boost/itl/interval_map.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -114,7 +114,7 @@
     class Traits = itl::neutron_absorber,
     ITL_COMPARE Compare  = ITL_COMPARE_INSTANCE(std::less, DomainT),
     ITL_COMBINE Combine  = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT),
-	ITL_SECTION Section  = ITL_SECTION_INSTANCE(itl::inplace_star, CodomainT), 
+	ITL_SECTION Section  = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), 
     template<class,ITL_COMPARE>class Interval = itl::interval,
     ITL_ALLOC   Alloc    = std::allocator
 >
Modified: sandbox/itl/boost/itl/interval_maps.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_maps.hpp	(original)
+++ sandbox/itl/boost/itl/interval_maps.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -53,497 +53,57 @@
 }
 
 //-----------------------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator +=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> operand_type;
-    const_FORALL(typename operand_type, elem_, operand) 
-        object.add(*elem_); 
-
-    return object; 
-}
-
-//--- value_type --------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator +=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename 
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::value_type& operand
-)
-{
-    return object.add(operand); 
-}
-
-//--- mapping_type ------------------------------------------------------------
-// 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, identical member function add. 
-
-    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. 
-*/
-template 
-<
-    class DomainT, class CodomainT, class Traits,
- 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator +=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::domain_mapping_type& operand
-)
-{
-    return object.add(operand); 
-}
-//-----------------------------------------------------------------------------
-
-
-//-----------------------------------------------------------------------------
-// addition |=
-//-----------------------------------------------------------------------------
-template 
-<
-	class ObjectT,
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-ObjectT& operator |=
-(
-          ObjectT& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{ return object += operand; }
-
-template 
-<
-    class SubType, class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> 
-operator |
-(
-    const interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-	typedef interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) += operand; 
-}
-//-----------------------------------------------------------------------------
-
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator |=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{ return object += operand; }
-
-template 
-<
-    class DomainT, class CodomainT, class Traits,
- 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator |
-(
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-	typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) += operand; 
-}
-//-----------------------------------------------------------------------------
-
-//--- value_type --------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits,
- 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator |=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename 
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::value_type& operand
-)
-{
-    return object.add(operand); 
-}
-
-template 
-<
-    class DomainT, class CodomainT, class Traits,
- 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> 
-operator |
-(
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::value_type& operand
-)
-{
-	typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) += operand; 
-}
-//-----------------------------------------------------------------------------
-
-//--- mapping_type ------------------------------------------------------------
-// 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, identical member function add. 
-
-    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. 
-*/
-template 
-<
-    class DomainT, class CodomainT, class Traits,
- 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator |=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::domain_mapping_type& operand
-)
-{
-    return object.add(operand); 
-}
-
-template 
-<
-    class DomainT, class CodomainT, class Traits,
- 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator |
-(
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::domain_mapping_type& operand
-)
-{
-	typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) |= operand; 
-}
-//-----------------------------------------------------------------------------
-
-
-
-//-----------------------------------------------------------------------------
-// subtraction -=
-//-----------------------------------------------------------------------------
-template 
-<
-    class SubType, class DomainT, class CodomainT, class Traits,
- 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator -=
-(
-          interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> operand_type;
-    const_FORALL(typename operand_type, elem_, operand) 
-        object.subtract(*elem_); 
-
-    return object; 
-}
-
-template 
-<
-    class SubType, class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator -
-(
-    const interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-	typedef interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) += operand; 
-}
-//-----------------------------------------------------------------------------
-
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator -=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> operand_type;
-    const_FORALL(typename operand_type, elem_, operand) 
-        object.subtract(*elem_); 
-
-    return object; 
-}
-
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator -
-(
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-	typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) -= operand; 
-}
-//-----------------------------------------------------------------------------
-
-//--- value_type --------------------------------------------------------------
-// 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 
-    neutron_absorber. 
-*/
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator -=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::value_type& operand
-)
-{
-    return object.subtract(operand); 
-}
-
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator -
-(
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::value_type& operand
-)
-{
-	typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) -= operand; 
-}
+// subtraction -=
 //-----------------------------------------------------------------------------
-
-
-//--- mapping_type ---------------------------------------------------------
 template 
 <
+	class ObjectT,
     class DomainT, class CodomainT, class Traits,
     ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
     template
-    <    
+    <
         class, class, class, 
         ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
     >
     class IntervalMap
 >
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator -=
+ObjectT& operator -=
 (
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::domain_mapping_type& operand
+          ObjectT& object,
+    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
 )
 {
-    return object.subtract(operand); 
+    typedef IntervalMap<DomainT,CodomainT,
+                        Traits,Compare,Combine,Section,Interval,Alloc> operand_type;
+    const_FORALL(typename operand_type, elem_, operand) 
+        object.subtract(*elem_); 
+
+    return object; 
 }
 
+//-----------------------------------------------------------------------------
+// symmetric difference ^=
+//-----------------------------------------------------------------------------
 template 
 <
+	class ObjectT,
     class DomainT, class CodomainT, class Traits,
     ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
     template
-    <    
+    <
         class, class, class, 
         ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
     >
     class IntervalMap
 >
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator -
+ObjectT& operator ^=
 (
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::domain_mapping_type& operand
+          ObjectT& object,
+    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
 )
 {
-	typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) -= operand; 
+    return object.flip(operand); 
 }
-//-----------------------------------------------------------------------------
 
 //-----------------------------------------------------------------------------
 // erasure -= of elements given by an interval_set
@@ -568,69 +128,6 @@
     return object; 
 }
 
-template 
-<
-    class SubType, class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class,  ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
-operator -
-(
-    const interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalSet<DomainT,Compare,Interval,Alloc>& operand
-)
-{
-	typedef interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) -= operand; 
-}
-//-----------------------------------------------------------------------------
-
-//--- value_type --------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator -=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::interval_type& operand
-)
-{
-    return object.erase(operand); 
-}
-
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> 
-operator -
-(
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::interval_type& operand
-)
-{
-	typedef IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> ObjectT;
-	return ObjectT(object) -= operand; 
-}
-//-----------------------------------------------------------------------------
-
 
 //-----------------------------------------------------------------------------
 // insert  
@@ -676,245 +173,6 @@
     return object;
 }
 
-//-----------------------------------------------------------------------------
-// intersection &=  
-//-----------------------------------------------------------------------------
-template<class ObjectT, class OperandT>
-typename boost::enable_if<is_inter_combinable<ObjectT, OperandT>, 
-                          ObjectT>::type&
-operator &= (ObjectT& object, const OperandT& operand
-)
-{
-    typedef ObjectT object_type;
-    object_type intersection;
-    object.add_intersection(intersection,operand);
-    object.swap(intersection);
-    return object;
-}
-
-/*CL
-template 
-<
-	class ObjectT,
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-ObjectT& operator &=
-(
-          ObjectT& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-    typedef ObjectT object_type;
-    object_type intersection;
-    object.add_intersection(intersection, operand);
-    object.swap(intersection);
-	return object;
-}
-
-
-template 
-<
-	class SubType,
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-SubType& operator &=
-(
-          interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-    typedef interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> object_type;
-    object_type intersection;
-    object.add_intersection(intersection, operand);
-    object.swap(intersection);
-	return object.self();
-    //return *(static_cast<SubType*>(&object));
-}
-*/
-
-/*
-//-----------------------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator &=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> object_type;
-    object_type intersection;
-    object.add_intersection(intersection,operand);
-    object.swap(intersection);
-    return object;
-}
-
-//--- value_type --------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator &=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename 
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::value_type& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> object_type;
-    object_type intersection;
-    object.add_intersection(intersection,operand);
-    object.swap(intersection);
-    return object;
-}
-
-//--- mapping_type ------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits,
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator &=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::domain_mapping_type& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> object_type;
-    object_type intersection;
-    object.add_intersection(intersection,operand);
-    object.swap(intersection);
-    return object;
-}
-
-//--- interval_type ------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits, 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator &=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::interval_type& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> object_type;
-    object_type intersection;
-    object.add_intersection(intersection,operand);
-    object.swap(intersection);
-    return object;
-}
-
-//--- element_type ------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits, 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator &=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const typename IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::domain_type& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> object_type;
-    object_type intersection;
-    object.add_intersection(intersection,operand);
-    object.swap(intersection);
-    return object;
-}
-
-//--- set_types ------------------------------------------------------------
-template 
-<
-    class DomainT, class CodomainT, class Traits, 
-    ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template
-    <    
-        class, class, class, 
-        ITL_COMPARE, ITL_COMBINE, ITL_SECTION, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalMap,
-    template
-    <    
-        class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC
-    >
-    class IntervalSet
->
-IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& 
-operator &=
-(
-          IntervalMap<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>& object,
-    const IntervalSet<DomainT,Compare,Interval,Alloc>& operand
-)
-{
-    typedef IntervalMap<DomainT,CodomainT,
-                        Traits,Compare,Combine,Section,Interval,Alloc> object_type;
-    object_type intersection;
-    object.add_intersection(intersection,operand);
-    object.swap(intersection);
-    return object;
-}
-*/
 
 //-----------------------------------------------------------------------------
 // is_element_equal
Modified: sandbox/itl/boost/itl/interval_sets.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_sets.hpp	(original)
+++ sandbox/itl/boost/itl/interval_sets.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -40,90 +40,6 @@
     return object; 
 }
 
-//--- interval_type -----------------------------------------------------------
-template 
-<
-    class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>& 
-operator +=
-(
-    IntervalSet<DomainT,Compare,Interval,Alloc>& object,
-    const typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type& interval
-)
-{
-    return object.add(interval);
-}
-//-----------------------------------------------------------------------------
-
-//--- domain_type -------------------------------------------------------------
-template 
-<
-    class DomainT, 
-    ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>& 
-operator +=
-(
-    IntervalSet<DomainT,Compare,Interval,Alloc>& object,
-    const typename IntervalSet<DomainT,Compare,Interval,Alloc>::domain_type& value
-)
-{
-    return object.add(value);
-}
-
-//-----------------------------------------------------------------------------
-// addition |=
-//-----------------------------------------------------------------------------
-template 
-<
-    class SubType, class DomainT, 
-    ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& 
-operator |=
-(
-          interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& object,
-    const IntervalSet              <DomainT,Compare,Interval,Alloc>& operand
-)
-{ return object += operand; }
-
-//--- interval_type -----------------------------------------------------------
-template 
-<
-    class DomainT, 
-    ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>& 
-operator |=
-(
-    IntervalSet<DomainT,Compare,Interval,Alloc>& object,
-    const typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type& interval
-)
-{
-    return object.add(interval);
-}
-
-//--- domain_type -------------------------------------------------------------
-template 
-<
-    class DomainT, 
-    ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>& 
-operator |=
-(
-    IntervalSet<DomainT,Compare,Interval,Alloc>& object,
-    const typename IntervalSet<DomainT,Compare,Interval,Alloc>::domain_type& value
-)
-{
-    return object.add(value);
-}
 //-----------------------------------------------------------------------------
 // difference -=
 //-----------------------------------------------------------------------------
@@ -147,148 +63,26 @@
         return object; 
 }
 
+//-----------------------------------------------------------------------------
+// symmetric difference ^=
+//-----------------------------------------------------------------------------
 template 
 <
     class SubType, class DomainT, 
     ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
     template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
 >
-interval_base_set<SubType,DomainT,Compare,Interval,Alloc>
-operator -
+interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& 
+operator ^=
 (
-    const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& object,
+          interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& object,
     const IntervalSet              <DomainT,Compare,Interval,Alloc>& operand
 )
 {
-	typedef interval_base_set<SubType,DomainT,Compare,Interval,Alloc> ObjectT;
-	return ObjectT(object) -= operand; 
+	return object.flip(operand);
 }
-//-----------------------------------------------------------------------------
 
 
-//--- interval_type -----------------------------------------------------------
-template 
-<
-    class DomainT, 
-    ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>& 
-operator -=
-(
-    IntervalSet<DomainT,Compare,Interval,Alloc>& object,
-    const typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type& interval
-)
-{
-    return object.subtract(interval);
-}
-
-//--- domain_type -------------------------------------------------------------
-template 
-<
-    class DomainT, 
-    ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>& 
-operator -=
-(
-    IntervalSet<DomainT,Compare,Interval,Alloc>& object,
-    const typename IntervalSet<DomainT,Compare,Interval,Alloc>::domain_type& value
-)
-{
-    return object.subtract(value);
-}
-
-//-----------------------------------------------------------------------------
-// intersection &=
-//-----------------------------------------------------------------------------
-template 
-<
-    class ObjectT, 
-	class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-ObjectT& operator &=
-(
-          ObjectT& object,
-    const IntervalSet<DomainT,Compare,Interval,Alloc>& operand
-)
-{
-    typedef ObjectT object_type;
-    typedef IntervalSet<DomainT,Compare,Interval,Alloc> operand_type;
-    object_type intersection;
-
-    if(operand.empty())
-    {
-        object.clear();
-        return object;
-    }
-
-    typename operand_type::const_iterator common_lwb;
-    typename operand_type::const_iterator common_upb;
-
-    if(!Set::common_range(common_lwb, common_upb, operand, object))
-    {
-        object.clear();
-        return object;
-    }
-
-    typename operand_type::const_iterator it = common_lwb;
-    while(it != common_upb)
-        object.add_intersection(intersection, *it++);
-
-    object.swap(intersection);
-
-    return object; 
-}
-
-//--- interval_type -----------------------------------------------------------
-template 
-<
-    class DomainT, 
-    ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>& 
-operator &=
-(
-    IntervalSet<DomainT,Compare,Interval,Alloc>& object,
-    const typename IntervalSet<DomainT,Compare,Interval,Alloc>::interval_type& interval
-)
-{
-    typedef IntervalSet<DomainT,Compare,Interval,Alloc> object_type;
-    object_type intersection;
-
-    if(interval.empty())
-    {
-        object.clear();
-        return object;
-    }
-
-    object.add_intersection(intersection, interval);
-    object.swap(intersection);
-    return object; 
-}
-
-//--- domain_type -------------------------------------------------------------
-template 
-<
-    class DomainT, 
-    ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc,
-    template<class, ITL_COMPARE, template<class,ITL_COMPARE>class, ITL_ALLOC>class IntervalSet
->
-IntervalSet<DomainT,Compare,Interval,Alloc>& 
-operator &=
-(
-    IntervalSet<DomainT,Compare,Interval,Alloc>& object,
-    const DomainT& value
-)
-{
-    typedef typename IntervalSet<DomainT,Compare,Interval,Alloc>
-        ::interval_type interval_type;
-    return object &= interval_type(value);
-}
 //-----------------------------------------------------------------------------
 // is_element_equal
 //-----------------------------------------------------------------------------
Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp	(original)
+++ sandbox/itl/boost/itl/map.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -106,7 +106,7 @@
         class Traits = itl::neutron_absorber,
         ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, DomainT),
         ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT),
-		ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, CodomainT), 
+		ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), 
         ITL_ALLOC   Alloc   = std::allocator 
     >
     class map: private std::map<DomainT, CodomainT, ITL_COMPARE_DOMAIN(Compare,DomainT), 
@@ -135,7 +135,8 @@
         typedef ITL_COMBINE_CODOMAIN(Combine,CodomainT)     codomain_combine;
         typedef domain_compare                              key_compare;
                 typedef typename inverse<codomain_combine >::type   inverse_codomain_combine;
-		typedef inplace_star<CodomainT>                     codomain_intersect;
+		typedef ITL_SECTION_CODOMAIN(Section,CodomainT)     codomain_intersect;
+		typedef typename inverse<codomain_intersect>::type  inverse_codomain_intersect;
                 typedef typename base_type::value_compare           value_compare;
 
     public:
@@ -290,11 +291,11 @@
         /** Represent this map as string */
         std::string as_string()const;
 
+	//private:
         public: //JODO private: Problem add<F>(x) is used in set_algo 
         template<class Combiner>
         map& add(const value_type& value_pair);
 
-	private:
         template<class Combiner>
         map& subtract(const value_type& value_pair);
     };
@@ -663,6 +664,27 @@
     }
 
 
+    /** Symmetric subtract map \c x2 and \c *this.
+        So \c *this becomes the symmetric difference of \c *this and \c x2 */
+    template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+	inline itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>&
+    operator ^= (      itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
+	             const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
+    {
+		Map::flip(object, operand); 
+		return object; 
+	}
+
+    template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, ITL_ALLOC Alloc>
+	itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>
+    operator ^  (const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& object,
+	             const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
+    { 
+		typedef itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> ObjectT;
+		return ObjectT(object) ^= operand; 
+    }
+
+
         //-----------------------------------------------------------------------------
         // type traits
         //-----------------------------------------------------------------------------
Modified: sandbox/itl/boost/itl/map_algo.hpp
==============================================================================
--- sandbox/itl/boost/itl/map_algo.hpp	(original)
+++ sandbox/itl/boost/itl/map_algo.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -63,6 +63,7 @@
             return true;
         }
 
+		/*CL
         template<class MapType>
         void intersection(MapType& y, const MapType& x1, const MapType& x2)
         {
@@ -84,6 +85,7 @@
             }
             tmp.swap(y);
         }
+		*/
 
         // optimized version
         template<class MapType>
@@ -104,10 +106,10 @@
                 if(x2_ != x2.end())
                 {
                     result.insert(*x1_);
-                    if(is_set<typename MapType::data_type>::value)
+                    if(is_set<typename MapType::codomain_type>::value)
                                                 result.template add<MapType::codomain_intersect>(*x2_); //MEMO template cast for gcc
                     else
-                        result.template add<MapType::codomain_combine>(*x2_);//JODO URG
+                        result.template add<MapType::codomain_combine>(*x2_);
                 }
                 x1_++;
             }
@@ -155,6 +157,48 @@
             tmp.swap(result);
         }
 
+        //----------------------------------------------------------------------
+		// flip
+        //----------------------------------------------------------------------
+        template<class MapType>
+        void flip(MapType& result, const MapType& x2)
+        {
+			if(emits_neutrons<MapType>::value && absorbs_neutrons<MapType>::value)
+			{
+				result.clear();
+				return;
+			}
+
+            typename MapType::const_iterator x2_ = x2.begin(), cur_x2_, x1_;
+            while(x2_ != x2.end()) 
+			{
+				cur_x2_ = x2_;
+				std::pair<typename MapType::iterator,bool> insertion 
+					= result.insert(*x2_++);
+				if(!insertion.WAS_SUCCESSFUL)
+				{
+					//result.erase(insertion.ITERATOR);
+					if(is_set<typename MapType::codomain_type>::value)
+					{
+						typename MapType::iterator res_ = insertion.ITERATOR;
+						typename MapType::codomain_type common_value = res_->CONT_VALUE;
+						MapType::inverse_codomain_intersect()(common_value, cur_x2_->CONT_VALUE);
+						result.subtract(*res_);
+						result.add(MapType::value_type(res_->KEY_VALUE, common_value));
+						//JODO result.template flip<MapType::inverse_codomain_intersect>(*insertion.ITERATOR);
+					}
+                    else
+                        result.subtract(*insertion.ITERATOR);
+				}
+			}
+
+			if(emits_neutrons<MapType>::value && !absorbs_neutrons<MapType>::value)//JODO
+				FORALL(typename MapType, it_, result)
+					it_->CONT_VALUE = neutron<typename MapType::codomain_type>::value();
+        }
+
+
+
                 template<class MapType>
                 typename MapType::const_iterator next_proton(typename MapType::const_iterator& iter_, const MapType& object)
                 {
Modified: sandbox/itl/boost/itl/operators.hpp
==============================================================================
--- sandbox/itl/boost/itl/operators.hpp	(original)
+++ sandbox/itl/boost/itl/operators.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -15,9 +15,16 @@
 {
 
 //------------------------------------------------------------------------------
-// Addability
+// Addability +=, +
 //------------------------------------------------------------------------------
 template<class ObjectT, class OperandT>
+typename boost::enable_if<is_intra_derivative<ObjectT, OperandT>, 
+                          ObjectT>::type&
+operator += (ObjectT& object, const OperandT& operand)
+{ return object.add(operand); }
+
+
+template<class ObjectT, class OperandT>
 typename boost::enable_if<is_binary_intra_combinable<ObjectT, OperandT>, ObjectT>::type
 operator + (const ObjectT& object, const OperandT& operand)
 { return ObjectT(object) += operand; }
@@ -34,9 +41,76 @@
 
 
 //------------------------------------------------------------------------------
-// Intersection
+// Addability |=, | 
+//------------------------------------------------------------------------------
+template<class ObjectT, class OperandT>
+typename boost::enable_if<is_right_intra_combinable<ObjectT, OperandT>, 
+                          ObjectT>::type&
+operator |= (ObjectT& object, const OperandT& operand)
+{ return object += operand; }
+
+
+template<class ObjectT, class OperandT>
+typename boost::enable_if<is_binary_intra_combinable<ObjectT, OperandT>, ObjectT>::type
+operator | (const ObjectT& object, const OperandT& operand)
+{ return ObjectT(object) += operand; }
+
+template<class ObjectT, class OperandT>
+typename boost::enable_if<is_binary_intra_combinable<ObjectT, OperandT>, ObjectT>::type
+operator | (const OperandT& operand, const ObjectT& object)
+{ return ObjectT(object) += operand; }
+
+
+template<class ObjectT>
+ObjectT operator | (const typename ObjectT::overloadable_type& object, const ObjectT& operand)
+{ return ObjectT(object) += operand; }
+
+
+//------------------------------------------------------------------------------
+// Subtraction -=, -
 //------------------------------------------------------------------------------
 template<class ObjectT, class OperandT>
+typename boost::enable_if<is_intra_derivative<ObjectT, OperandT>, 
+                          ObjectT>::type&
+operator -= (ObjectT& object, const OperandT& operand)
+{ return object.subtract(operand); }
+
+template<class ObjectT, class OperandT>
+typename boost::enable_if<is_cross_derivative<ObjectT, OperandT>, 
+                          ObjectT>::type&
+operator -= (ObjectT& object, const OperandT& operand)
+{ return object.erase(operand); }
+
+
+template<class ObjectT, class OperandT>
+typename boost::enable_if<is_right_inter_combinable<ObjectT, OperandT>, ObjectT>::type
+operator - (const ObjectT& object, const OperandT& operand)
+{ return ObjectT(object) -= operand; }
+
+template<class ObjectT, class OperandT>
+typename boost::enable_if<is_right_inter_combinable<ObjectT, OperandT>, ObjectT>::type
+operator - (const OperandT& operand, const ObjectT& object)
+{ return ObjectT(object) -= operand; }
+
+template<class ObjectT>
+ObjectT operator - (const typename ObjectT::overloadable_type& object, const ObjectT& operand)
+{ return ObjectT(object) -= operand; }
+
+
+//------------------------------------------------------------------------------
+// Intersection &=, &
+//------------------------------------------------------------------------------
+template<class ObjectT, class OperandT>
+typename boost::enable_if<is_right_inter_combinable<ObjectT, OperandT>, ObjectT>::type&
+operator &= (ObjectT& object, const OperandT& operand)
+{
+    ObjectT intersection;
+    object.add_intersection(intersection, operand);
+	object.swap(intersection);
+    return object;
+}
+
+template<class ObjectT, class OperandT>
 typename boost::enable_if<is_binary_inter_combinable<ObjectT, OperandT>, ObjectT>::type
 operator & (const ObjectT& object, const OperandT& operand)
 { return ObjectT(object) &= operand; }
@@ -50,6 +124,16 @@
 ObjectT operator & (const typename ObjectT::overloadable_type& object, const ObjectT& operand)
 { return ObjectT(object) &= operand; }
 
+//------------------------------------------------------------------------------
+// Symmetric difference ^=, ^
+//------------------------------------------------------------------------------
+template<class ObjectT, class OperandT>
+typename boost::enable_if<is_intra_derivative<ObjectT, OperandT>, 
+                          ObjectT>::type&
+operator ^= (ObjectT& object, const OperandT& operand)
+{ return object.flip(operand); }
+
+
 }} // namespace itl boost
 
 #endif
Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp	(original)
+++ sandbox/itl/boost/itl/set.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -434,6 +434,43 @@
                      const itl::set<DomainT,Compare,Alloc>& operand)
     { return itl::set<DomainT,Compare,Alloc>(object) &= operand; }
 
+	//--------------------------------------------------------------------------
+	// itl::set::symmetric_difference operators ^=, ^
+	//--------------------------------------------------------------------------
+    template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
+    inline itl::set<DomainT,Compare,Alloc>& 
+	operator ^= (      itl::set<DomainT,Compare,Alloc>& object,
+	    const typename itl::set<DomainT,Compare,Alloc>::value_type& operand)
+    {
+		typedef itl::set<DomainT,Compare,Alloc> ObjectT;
+		if(object.contains(operand))
+			return erase(operand);
+		else
+			return add(operand);
+	} 
+
+    template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
+    itl::set<DomainT,Compare,Alloc> 
+	operator ^  (const itl::set<DomainT,Compare,Alloc>& object,
+	    const typename itl::set<DomainT,Compare,Alloc>::value_type& operand)
+    { return itl::set<DomainT,Compare,Alloc>(object) &= operand; }
+
+
+
+    /** Intersect set \c object with \c operand. 
+	    So \c object becomes the intersection of \c object and \c operand */
+    template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
+    inline itl::set<DomainT,Compare,Alloc>& 
+	operator ^= (      itl::set<DomainT,Compare,Alloc>& object,
+	             const itl::set<DomainT,Compare,Alloc>& operand)
+    { Set::flip(object, operand); return object; }
+
+    template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
+    itl::set<DomainT,Compare,Alloc> 
+	operator ^  (const itl::set<DomainT,Compare,Alloc>& object,
+	             const itl::set<DomainT,Compare,Alloc>& operand)
+    { return itl::set<DomainT,Compare,Alloc>(object) &= operand; }
+
 
 
     template <typename DomainT, ITL_COMPARE Compare, ITL_ALLOC Alloc>
Modified: sandbox/itl/boost/itl/set_algo.hpp
==============================================================================
--- sandbox/itl/boost/itl/set_algo.hpp	(original)
+++ sandbox/itl/boost/itl/set_algo.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -214,6 +214,20 @@
         }
 
 
+		template<class SetType>
+        void flip(SetType& result, const SetType& x2)
+        {
+            typename SetType::const_iterator x2_ = x2.begin(), x1_;
+            while(x2_ != x2.end()) 
+			{
+				std::pair<typename SetType::iterator,bool> insertion = result.insert(*x2_++);
+				if(!insertion.WAS_SUCCESSFUL)
+					result.erase(insertion.ITERATOR);
+			}
+        }
+
+
+
         template<class SetType>
         bool disjoint(const SetType& x1, const SetType& x2)
         {
Modified: sandbox/itl/boost/itl/split_interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_map.hpp	(original)
+++ sandbox/itl/boost/itl/split_interval_map.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -131,7 +131,7 @@
         class Traits = itl::neutron_absorber,
         ITL_COMPARE Compare  = ITL_COMPARE_INSTANCE(std::less, DomainT),
         ITL_COMBINE Combine  = ITL_COMBINE_INSTANCE(itl::inplace_plus, CodomainT),
-		ITL_SECTION Section  = ITL_SECTION_INSTANCE(itl::inplace_star, CodomainT), 
+		ITL_SECTION Section  = ITL_SECTION_INSTANCE(itl::inplace_et, CodomainT), 
                 template<class,ITL_COMPARE>class Interval = itl::interval,
         ITL_ALLOC   Alloc    = std::allocator
     >
Modified: sandbox/itl/boost/itl/type_traits/is_combinable.hpp
==============================================================================
--- sandbox/itl/boost/itl/type_traits/is_combinable.hpp	(original)
+++ sandbox/itl/boost/itl/type_traits/is_combinable.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -14,7 +14,7 @@
 #include <boost/mpl/or.hpp> 
 #include <boost/mpl/not.hpp> 
 #include <boost/type_traits/is_same.hpp>
-#include <boost/itl/type_traits/is_interval_splitter.hpp> 
+//CL #include <boost/itl/type_traits/is_interval_splitter.hpp> 
 
 namespace boost{namespace itl
 {
@@ -22,7 +22,9 @@
 template<class Type>
 struct is_overloadable
 {
-	enum { value = is_same<Type, typename Type::overloadable_type>::value };
+	typedef is_overloadable<Type> type;
+	static const bool value = 
+		is_same<Type, typename Type::overloadable_type>::value;
 };
 
 
@@ -30,17 +32,16 @@
 struct is_interval_map
 {
         typedef is_interval_map<Type> type; 
-	enum{value = mpl::and_<is_interval_container<Type>, is_map<Type> >::value}; 
+	static const bool value =
+		is_interval_container<Type>::value && is_map<Type>::value; 
 };
 
 template<class Type>
 struct is_interval_set
 { 
         typedef is_interval_set<Type> type; 
-	enum{ value = mpl::and_<  is_interval_container<Type>
-		                    , mpl::not_<is_interval_map<Type> > 
-	                       >::value
-	    }; 
+	static const bool value =
+		is_interval_container<Type>::value && !is_interval_map<Type>::value; 
 };
 
 
@@ -52,7 +53,9 @@
 
 template<class Type>
 struct is_interval_set_derivative<Type, typename Type::domain_type>
-{ enum{ value = is_interval_container<Type>::value }; };
+{ 
+	static const bool value = is_interval_container<Type>::value; 
+};
 
 template<class Type>
 struct is_interval_set_derivative<Type, typename Type::interval_type>
@@ -95,10 +98,31 @@
 struct is_interval_map_derivative
 {
         typedef is_interval_map_derivative<Type, AssociateT> type;
-	static const bool value = is_interval_container<Type>::value;
+	static const bool value = false;
 };
 
+//------------------------------------------------------------------------------
+// is_intra_derivative
+//------------------------------------------------------------------------------
+template<class Type, class AssociateT>
+struct is_intra_derivative
+{
+	typedef is_intra_derivative<Type, AssociateT> type;
+	static const bool value = 
+			(   is_interval_set<Type>::value 
+			&&  is_interval_set_derivative<Type, AssociateT>::value)
+		||  (   is_interval_map<Type>::value
+		    &&  is_interval_map_derivative<Type, AssociateT>::value);
+};
 
+template<class Type, class AssociateT>
+struct is_cross_derivative
+{
+	typedef is_cross_derivative<Type, AssociateT> type;
+	static const bool value = 
+			(   is_interval_map<Type>::value 
+			&&  is_interval_set_derivative<Type, AssociateT>::value);
+};
 
 
 //------------------------------------------------------------------------------
@@ -235,12 +259,12 @@
 
 
 //------------------------------------------------------------------------------
-// is_interval_{set,map}_combinable
+// is_right_interval_{set,map}_combinable
 //------------------------------------------------------------------------------
 template<class GuideT, class CompanionT>
-struct is_interval_set_combinable
+struct is_right_interval_set_combinable
 { 
-	typedef is_interval_set_combinable<GuideT,CompanionT> type;
+	typedef is_right_interval_set_combinable<GuideT,CompanionT> type;
         enum{ value = mpl::and_<  is_interval_set<GuideT>
                                     , is_interval_set_companion<GuideT, CompanionT> 
 	                       >::value
@@ -248,9 +272,9 @@
 };
 
 template<class GuideT, class CompanionT>
-struct is_interval_map_combinable
+struct is_right_interval_map_combinable
 { 
-	typedef is_interval_map_combinable<GuideT,CompanionT> type;
+	typedef is_right_interval_map_combinable<GuideT,CompanionT> type;
         enum{ value = mpl::and_<  is_interval_map<GuideT>
                                     , is_interval_map_companion<GuideT, CompanionT> 
 	                       >::value
@@ -258,19 +282,19 @@
 };
 
 template<class GuideT, class CompanionT>
-struct is_intra_combinable
+struct is_right_intra_combinable
 { 
-	typedef is_intra_combinable<GuideT,CompanionT> type;
+	typedef is_right_intra_combinable<GuideT,CompanionT> type;
         static const bool value =
-	    mpl::or_<is_interval_set_combinable<GuideT, CompanionT>,
-			     is_interval_map_combinable<GuideT, CompanionT> 
+	    mpl::or_<is_right_interval_set_combinable<GuideT, CompanionT>,
+			     is_right_interval_map_combinable<GuideT, CompanionT> 
 	            >::value;
 };
 
 template<class GuideT, class CompanionT>
-struct is_cross_combinable
+struct is_right_cross_combinable
 { 
-	typedef is_cross_combinable<GuideT,CompanionT> type;
+	typedef is_right_cross_combinable<GuideT,CompanionT> type;
         static const bool value =
             mpl::and_
             <     is_interval_map<GuideT>
@@ -280,16 +304,16 @@
 };
 
 template<class GuideT, class CompanionT>
-struct is_inter_combinable
+struct is_right_inter_combinable
 { 
-	typedef is_inter_combinable<GuideT,CompanionT> type;
+	typedef is_right_inter_combinable<GuideT,CompanionT> type;
         static const bool value =
             mpl::or_
             <     
                         mpl::and_<is_interval_map<GuideT>, 
-			          is_cross_combinable<GuideT, CompanionT> >
+			          is_right_cross_combinable<GuideT, CompanionT> >
           , mpl::and_<is_interval_set<GuideT>, 
-		              is_intra_combinable<GuideT, CompanionT> >
+		              is_right_intra_combinable<GuideT, CompanionT> >
 	    >::value;
 };
 
Modified: sandbox/itl/boost/itl_xt/mapgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/mapgentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/mapgentor.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -75,7 +75,7 @@
     void setRangeOfSampleSize(int lwb, int upb)
     { m_sampleSizeRange = interval<int>::rightopen(lwb,upb); }
     void setRangeOfSampleSize(const interval<int>& szRange)
-    { BOOST_ASSERT(szRange.is_rightopen()); m_sampleSizeRange = szRange; }
+    { BOOST_ASSERT(szRange.is(right_open)); m_sampleSizeRange = szRange; }
 
 private:
     RandomGentorAT<DomainTD>*    p_domainGentor;
Modified: sandbox/itl/boost/itl_xt/numbergentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/numbergentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/numbergentor.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -91,7 +91,7 @@
     NumTV operator() (NumTV lwb, NumTV upb)  { return rnd_within_exUpb<NumTV>(lwb,upb); }
     NumTV operator() (interval<NumTV> rng) 
     { 
-        BOOST_ASSERT(rng.is_rightopen() || rng.is_closed());
+        BOOST_ASSERT(rng.is(right_open) || rng.is(closed_bounded));
         if(rng.is(right_open))
             return rnd_within_exUpb<NumTV>(rng.lower(), rng.upper());
         else
Modified: sandbox/itl/boost/itl_xt/random.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/random.hpp	(original)
+++ sandbox/itl/boost/itl_xt/random.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -59,7 +59,7 @@
     }
 
     unsigned rnd(const itl::interval<unsigned>& rng)
-    { BOOST_ASSERT( rng.is_rightopen() ); return rnd(rng.lower(),rng.upper()); }
+    { BOOST_ASSERT( rng.is(right_open) ); return rnd(rng.lower(),rng.upper()); }
 
 private:
     //JODO subtractive_rng m_random;
Modified: sandbox/itl/boost/itl_xt/setgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/setgentor.hpp	(original)
+++ sandbox/itl/boost/itl_xt/setgentor.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -66,7 +66,7 @@
     void setRangeOfSampleSize(int lwb, int upb)
     { m_sampleSizeRange = interval<int>::rightopen(lwb,upb); }
     void setRangeOfSampleSize(const interval<int>& szRange)
-    { BOOST_ASSERT(szRange.is_rightopen()); m_sampleSizeRange = szRange; }
+    { BOOST_ASSERT(szRange.is(right_open)); m_sampleSizeRange = szRange; }
 
     DomainGentorPT domainGentor()const { return p_domainGentor; } 
 
Modified: sandbox/itl/boost/validate/laws/set_laws.h
==============================================================================
--- sandbox/itl/boost/validate/laws/set_laws.h	(original)
+++ sandbox/itl/boost/validate/laws/set_laws.h	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -123,7 +123,7 @@
 
     // ---------------------------------------------------------------------------
     template <typename Type, template<class>class Operator1 = inplace_plus, 
-                             template<class>class Operator2 = inplace_star,
+                             template<class>class Operator2 = inplace_et,
                              template<class>class Equality  = itl::std_equal>
     class InplaceDistributivity 
         : public Law<InplaceDistributivity<Type,Operator1,Operator2,Equality>, 
@@ -223,7 +223,7 @@
 
     // ---------------------------------------------------------------------------
     template <typename Type, template<class>class Operator1 = inplace_plus, 
-                             template<class>class Operator2 = inplace_star, 
+                             template<class>class Operator2 = inplace_et, 
                              template<class>class Equality = itl::std_equal>
     class InplaceDeMorgan 
         : public Law<InplaceDeMorgan<Type,Operator1,Operator2,Equality>, 
@@ -392,7 +392,7 @@
                      LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
     {
         /** (a + b) - (a & b) == (a - b) + (b - a)
-        computed using inplace operators +=, += and &=
+        computed using inplace operators +=, -= and &=
         Input  = (a := inVal1, b := inVal2)
         Output = (lhs_result, rhs_result)
         */
@@ -483,6 +483,86 @@
     };
 
     // ---------------------------------------------------------------------------
+    template <typename Type, template<class>class Equality = itl::std_equal>
+    class InplaceFlip 
+        : public Law<InplaceFlip<Type>, 
+                     LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+    {
+        /** a ^ b == (a - b) + (b - a)
+        computed using inplace operators +=, -= and &=
+        Input  = (a := inVal1, b := inVal2)
+        Output = (lhs_result, rhs_result)
+        */
+    public:
+        std::string name()const { return "Inplace Flip"; }
+        std::string formula()const { return "a ^ b == (a-b) + (b-a) 'inplace'"; }
+
+        std::string typeString()const
+        {
+            return "Flip<"+type_to_string<Type>::apply()+","
+                          +unary_template_to_string<Equality>::apply()+">";
+        }
+
+    public:
+
+		bool holds() 
+        {
+            // --- left hand side ------------------------
+            Type lhs = this->template getInputValue<operand_a>();
+            lhs ^= this->template getInputValue<operand_b>();
+
+            // --- right hand side -----------------------
+            Type a_minus_b = this->template getInputValue<operand_a>();
+            a_minus_b -= this->template getInputValue<operand_b>();
+
+            Type b_minus_a = this->template getInputValue<operand_b>();
+            b_minus_a -= this->template getInputValue<operand_a>();
+
+            Type rhs = a_minus_b;
+            rhs += b_minus_a;
+
+            this->template setOutputValue<lhs_result>(lhs);
+            this->template setOutputValue<rhs_result>(rhs);
+
+            return Equality<Type>()(lhs, rhs);
+        }
+
+
+        bool debug_holds()
+        {
+            // --- left hand side ------------------------
+            Type lhs = this->template getInputValue<operand_a>();
+            lhs ^= this->template getInputValue<operand_b>();
+            std::cout << "lhs=" << lhs.as_string() << std::endl;
+
+            // --- right hand side -----------------------
+            Type a_minus_b = this->template getInputValue<operand_a>();
+            a_minus_b -= this->template getInputValue<operand_b>();
+            std::cout << "a_minus_b=" << a_minus_b.as_string() << std::endl;
+
+            Type b_minus_a = this->template getInputValue<operand_b>();
+            b_minus_a -= this->template getInputValue<operand_a>();
+            std::cout << "b_minus_a=" << b_minus_a.as_string() << std::endl;
+
+            Type rhs = a_minus_b;
+            rhs += b_minus_a;
+            std::cout << "rhs=" << rhs.as_string() << std::endl;
+
+            this->template setOutputValue<lhs_result>(lhs);
+            this->template setOutputValue<rhs_result>(rhs);
+
+            return Equality<Type>()(lhs, rhs);
+        }
+
+        size_t size()const 
+        { 
+            return 
+                value_size<Type>::apply(this->template getInputValue<operand_a>())+
+                value_size<Type>::apply(this->template getInputValue<operand_b>());
+        }
+    };
+
+    // ---------------------------------------------------------------------------
     template <typename MapT, template<class>class Equality = itl::std_equal>
     class SectionAbsorbtion 
         : public Law<SectionAbsorbtion<MapT>, 
Modified: sandbox/itl/boost/validate/typevalidater.h
==============================================================================
--- sandbox/itl/boost/validate/typevalidater.h	(original)
+++ sandbox/itl/boost/validate/typevalidater.h	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -278,8 +278,8 @@
             case inplacePlusAssociativity:   return new LawValidater<InplaceAssociativity<Type>, RandomGentor>;
             case inplacePlusNeutrality:      return new LawValidater<InplaceNeutrality<Type>, RandomGentor>;
             case inplacePlusCommutativity:   return new LawValidater<InplaceCommutativity<Type>, RandomGentor>;
-            case inplaceStarAssociativity:   return new LawValidater<InplaceAssociativity<Type, inplace_star>, RandomGentor>;
-            case inplaceStarCommutativity:   return new LawValidater<InplaceCommutativity<Type, inplace_star>, RandomGentor>;
+            case inplaceStarAssociativity:   return new LawValidater<InplaceAssociativity<Type, inplace_et>, RandomGentor>;
+            case inplaceStarCommutativity:   return new LawValidater<InplaceCommutativity<Type, inplace_et>, RandomGentor>;
             default: return NULL;
             }
         }
@@ -325,6 +325,7 @@
         { 
             inplaceSetBaseLaws,
             inplaceSymmetricDifference,
+            inplaceFlip,
             inplaceSelfRemovability,
             inplacePlusDistributivity,
             inplaceStarDistributivity,
@@ -339,17 +340,21 @@
 
         void setProfile()
         {
+			const int weight = 6;
+			const int law_count = 9;
+			const int base_weight = 100 - weight*law_count;
             _lawChoice.setSize(Laws_size);
             _lawChoice.setMaxWeights(100);
-            _lawChoice[inplaceSetBaseLaws]          = 44;
-            _lawChoice[inplaceSymmetricDifference]  = 7;
-            _lawChoice[inplaceSelfRemovability]     = 7;
-            _lawChoice[inplacePlusDistributivity]   = 7;
-            _lawChoice[inplaceStarDistributivity]   = 7;
-            _lawChoice[inplacePlusDashRightDistrib] = 7;
-            _lawChoice[inplaceStarDashRightDistrib] = 7;
-            _lawChoice[inplacePlusDeMorgan]         = 7;
-            _lawChoice[inplaceStarDeMorgan]         = 7;
+            _lawChoice[inplaceSetBaseLaws]          = base_weight;
+            _lawChoice[inplaceSymmetricDifference]  = weight;
+            _lawChoice[inplaceFlip]                 = weight;
+            _lawChoice[inplaceSelfRemovability]     = weight;
+            _lawChoice[inplacePlusDistributivity]   = weight;
+            _lawChoice[inplaceStarDistributivity]   = weight;
+            _lawChoice[inplacePlusDashRightDistrib] = weight;
+            _lawChoice[inplaceStarDashRightDistrib] = weight;
+            _lawChoice[inplacePlusDeMorgan]         = weight;
+            _lawChoice[inplaceStarDeMorgan]         = weight;
             _lawChoice.init();
         }
 
@@ -369,6 +374,7 @@
             {
             case inplaceSetBaseLaws:         return InplaceSetBaseValidater<Type>::chooseValidater();
             case inplaceSymmetricDifference: return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
+            case inplaceFlip:                return new LawValidater<InplaceFlip<Type>, RandomGentor>;
 
             case inplaceSelfRemovability:    
                                 if(    itl::is_map<Type>::value && itl::is_set<typename Type::codomain_type>::value
@@ -382,16 +388,16 @@
 
             case inplacePlusDistributivity:  
                 if(    itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
-					return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_star, itl::element_equal>, RandomGentor>;
+					return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::element_equal>, RandomGentor>;
                                 else
-					return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_star, itl::std_equal>, RandomGentor>;
+					return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
 
             case inplaceStarDistributivity:  
                 if(    itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value
                     && absorbs_neutrons<Type>::value && !emits_neutrons<Type>::value)
-					return new LawValidater<InplaceDistributivity<Type, inplace_star, inplace_plus, element_equal>, RandomGentor>;
+					return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, element_equal>, RandomGentor>;
                                 else
-					return new LawValidater<InplaceDistributivity<Type, inplace_star, inplace_plus, std_equal>, RandomGentor>;
+					return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, std_equal>, RandomGentor>;
 
             case inplacePlusDashRightDistrib:
                 if(    itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value
@@ -401,17 +407,17 @@
                                         return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, std_equal>, RandomGentor>;
 
             case inplaceStarDashRightDistrib:
-				return new LawValidater<InplaceRightDistributivity<Type, inplace_star, inplace_minus>, RandomGentor>;
+				return new LawValidater<InplaceRightDistributivity<Type, inplace_et, inplace_minus>, RandomGentor>;
 
             case inplacePlusDeMorgan:        
-				return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_star, itl::std_equal>, RandomGentor>;
+				return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
 
             case inplaceStarDeMorgan:        
                 if(     itl::is_interval_container<Type>::value 
                                         && (itl::is_interval_splitter<Type>::value || itl::is_interval_separator<Type>::value))
-					return new LawValidater<InplaceDeMorgan<Type, inplace_star, inplace_plus, itl::element_equal>, RandomGentor>;
+					return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, itl::element_equal>, RandomGentor>;
                                 else
-					return new LawValidater<InplaceDeMorgan<Type, inplace_star, inplace_plus, itl::std_equal>, RandomGentor>;
+					return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, itl::std_equal>, RandomGentor>;
 
             default: return NULL;
             }
@@ -424,19 +430,20 @@
             {
             case inplaceSetBaseLaws:         return InplaceSetBaseValidater<Type>::chooseValidater();
             case inplaceSymmetricDifference: return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
+            case inplaceFlip:                return new LawValidater<InplaceFlip<Type>, RandomGentor>;
             case inplaceSelfRemovability:    return new LawValidater<InplaceSelfRemovability<Type, inplace_plus, std_equal>, RandomGentor>;
 
             case inplacePlusDistributivity:  
                 if(    itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
-					return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_star, itl::element_equal>, RandomGentor>;
+					return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::element_equal>, RandomGentor>;
                                 else
-					return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_star, itl::std_equal>, RandomGentor>;
+					return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
 
             case inplaceStarDistributivity:  
                 if(    itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
-					return new LawValidater<InplaceDistributivity<Type, inplace_star, inplace_plus, element_equal>, RandomGentor>;
+					return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, element_equal>, RandomGentor>;
                                 else
-					return new LawValidater<InplaceDistributivity<Type, inplace_star, inplace_plus, std_equal>, RandomGentor>;
+					return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, std_equal>, RandomGentor>;
 
             case inplacePlusDashRightDistrib:
                 if(    itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
@@ -445,17 +452,17 @@
                                         return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, std_equal>, RandomGentor>;
 
             case inplaceStarDashRightDistrib:
-				return new LawValidater<InplaceRightDistributivity<Type, inplace_star, inplace_minus>, RandomGentor>;
+				return new LawValidater<InplaceRightDistributivity<Type, inplace_et, inplace_minus>, RandomGentor>;
 
             case inplacePlusDeMorgan:        
-				return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_star, itl::std_equal>, RandomGentor>;
+				return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
 
             case inplaceStarDeMorgan:        
                 if(     itl::is_interval_container<Type>::value 
                                         && (itl::is_interval_splitter<Type>::value || itl::is_interval_separator<Type>::value))
-					return new LawValidater<InplaceDeMorgan<Type, inplace_star, inplace_plus, itl::element_equal>, RandomGentor>;
+					return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, itl::element_equal>, RandomGentor>;
                                 else
-					return new LawValidater<InplaceDeMorgan<Type, inplace_star, inplace_plus, itl::std_equal>, RandomGentor>;
+					return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, itl::std_equal>, RandomGentor>;
 
             default: return NULL;
             }
@@ -517,6 +524,7 @@
         { 
             inplaceSetBaseLaws,
             inplaceSymmetricDifference,
+            inplaceFlip,
             inplaceSelfRemovability,
             inplaceInverseRemovability,
             sectionAbsorbtion,
@@ -534,6 +542,7 @@
                         {
                 _lawChoice[inplaceSetBaseLaws]         = 95;
                 _lawChoice[inplaceSymmetricDifference] = 0; // Is validated in base class
+                _lawChoice[inplaceFlip]                = 0; // Is validated in base class
                 _lawChoice[inplaceSelfRemovability]    = 0; // Is validated in base class
                 _lawChoice[inplaceInverseRemovability] = 0; // Is not valid for sets
                 _lawChoice[sectionAbsorbtion]          = 5;
@@ -542,8 +551,9 @@
             {
                                 //JODO A map of group values that does not emit neutrons always has a symmetric difference
                                 BOOST_ASSERT(Type::has_symmetric_difference());
-                _lawChoice[inplaceSetBaseLaws]         = 85;
+                _lawChoice[inplaceSetBaseLaws]         = 80;
                 _lawChoice[inplaceSymmetricDifference] = 5;
+                _lawChoice[inplaceFlip]                = 5;
                 _lawChoice[inplaceSelfRemovability]    = 5;
                 _lawChoice[inplaceInverseRemovability] = 0;
                 _lawChoice[sectionAbsorbtion]          = 5;
@@ -551,10 +561,11 @@
             else // !is_set && emits_neutrons  //JODO && is_abelian_group<Type::value>
             {
                 _lawChoice[inplaceSetBaseLaws]         = 80;
-                _lawChoice[inplaceSymmetricDifference] = 5;
-                _lawChoice[inplaceSelfRemovability]    = 5;
-                _lawChoice[inplaceInverseRemovability] = 5;
-                _lawChoice[sectionAbsorbtion]          = 5;
+                _lawChoice[inplaceSymmetricDifference] = 4;
+                _lawChoice[inplaceFlip]                = 4;
+                _lawChoice[inplaceSelfRemovability]    = 4;
+                _lawChoice[inplaceInverseRemovability] = 4;
+                _lawChoice[sectionAbsorbtion]          = 4;
             }
             _lawChoice.init();
         }
@@ -568,6 +579,8 @@
                 return SetValidaterT::chooseValidater();
             case inplaceSymmetricDifference: 
                 return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
+            case inplaceFlip: 
+                return new LawValidater<InplaceFlip<Type>, RandomGentor>;
 
             case inplaceSelfRemovability:
                                 if(is_map<Type>::value && !absorbs_neutrons<Type>::value)
@@ -682,10 +695,10 @@
                                RandomGentor
                            >();
             case atomize_minus:  return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_minus>, RandomGentor>();
-            case atomize_star:   return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_star>,  RandomGentor>();
+            case atomize_star:   return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_et>,  RandomGentor>();
             case cluster_plus:   return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_plus>,  RandomGentor>();
             case cluster_minus:  return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_minus>, RandomGentor>();
-            case cluster_star:   return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_star>,  RandomGentor>();
+            case cluster_star:   return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_et>,  RandomGentor>();
             case atomize_insert: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inserter>,      RandomGentor>();
             case atomize_erase:  return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, eraser>,        RandomGentor>();
             case cluster_insert: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inserter>,      RandomGentor>();
Modified: sandbox/itl/libs/itl/test/test_interval_map/test_interval_map_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map/test_interval_map_shared.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_interval_map/test_interval_map_shared.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -51,10 +51,18 @@
 {         interval_map_base_is_disjoint_4_bicremental_types<interval_map, T, int>();}
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_map_flip_4_bicremental_types, T, bicremental_types)
+{         interval_map_flip_4_bicremental_types<interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_itl_interval_map_infix_plus_overload_4_bicremental_types, T, bicremental_types)
 {         interval_map_infix_plus_overload_4_bicremental_types<interval_map, T, int>();}
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_map_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{         interval_map_infix_pipe_overload_4_bicremental_types<interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_itl_interval_map_infix_et_overload_4_bicremental_types, T, bicremental_types)
 {         interval_map_infix_et_overload_4_bicremental_types<interval_map, T, int>();}
 
Modified: sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -1214,7 +1214,7 @@
     BOOST_CHECK_EQUAL( split_A, split_B );
 }
 
-BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_set_mixed_infix_plus_overload_4_bicremental_types, T, bicremental_types)
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_map_mixed_infix_plus_overload_4_bicremental_types, T, bicremental_types)
 {
     typedef int U;
         typedef interval_map<T,U>  IntervalMapT;
@@ -1227,7 +1227,20 @@
         BOOST_CHECK_EQUAL(split_a + join_a, join_a + split_a);
 }
 
-BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_set_mixed_infix_et_overload_4_bicremental_types, T, bicremental_types)
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_map_mixed_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{
+    typedef int U;
+	typedef interval_map<T,U>  IntervalMapT;
+	interval_map<T,U>          join_a;
+	split_interval_map<T,U>    split_a;
+
+	join_a .add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
+	split_a.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+	BOOST_CHECK_EQUAL(split_a | join_a, join_a | split_a);
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_map_mixed_infix_et_overload_4_bicremental_types, T, bicremental_types)
 {
     typedef int U;
         typedef interval_map<T,U>  IntervalMapT;
Modified: sandbox/itl/libs/itl/test/test_interval_map_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map_shared.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_interval_map_shared.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -12,7 +12,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -161,7 +161,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -224,7 +224,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -279,7 +279,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -312,7 +312,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -363,7 +363,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -416,7 +416,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -460,7 +460,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -501,7 +501,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -608,7 +608,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -725,7 +725,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -793,12 +793,35 @@
     BOOST_CHECK_EQUAL( is_disjoint(map_B, set_A), false );
 }
 
+template <template<class T, class U,
+                   class Traits = neutron_absorber,
+                   ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+                   ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+                   template<class,ITL_COMPARE>class Interval = interval,
+                   ITL_ALLOC   Alloc   = std::allocator
+                  >class IntervalMap, 
+          class T, class U>
+void interval_map_flip_4_bicremental_types()
+{
+	typedef IntervalMap<T,U> IntervalMapT;
+	typedef IntervalMapT IMap;
+
+	IntervalMapT set_a, set_b, lhs, rhs;
+	//[0     2)
+	//    1
+	//    [1     3)
+	//        1
+	//[0 1)   [2 3) : {[0 2)->1} ^= ([2 3)->1)
+	//  1       1
+	BOOST_CHECK_EQUAL(IMap(IDv(0,2,1)) ^= (IDv(1,3,1)), IMap(IDv(0,1,1)) + IDv(2,3,1));
+}
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
@@ -825,7 +848,34 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
+                   template<class,ITL_COMPARE>class Interval = interval,
+                   ITL_ALLOC   Alloc   = std::allocator
+                  >class IntervalMap, 
+          class T, class U>
+void interval_map_infix_pipe_overload_4_bicremental_types()
+{
+	typedef IntervalMap<T,U> IntervalMapT;
+	typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
+	std::pair<const interval<T>, U> val_pair2 = IDv(3,5,3);
+	mapping_pair<T,U> map_pair = K_v(4,3);
+
+	IntervalMapT map_a, map_b;
+	map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
+	map_b.add(IDv(0,9,2)).add(IIv(3,6,1)).add(IDv(5,7,1));
+
+	BOOST_CHECK_EQUAL(map_a | map_b, map_b | map_a);
+	//This checks all cases of is_interval_map_derivative<T>
+	BOOST_CHECK_EQUAL(map_a | val_pair1, val_pair1 | map_a);
+	BOOST_CHECK_EQUAL(map_b | val_pair2, val_pair2 | map_b);
+	BOOST_CHECK_EQUAL(map_b | map_pair, map_pair | map_b);
+}
+
+template <template<class T, class U,
+                   class Traits = neutron_absorber,
+                   ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+                   ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap, 
Modified: sandbox/itl/libs/itl/test/test_interval_set/test_interval_set_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_set/test_interval_set_shared.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_interval_set/test_interval_set_shared.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -43,10 +43,18 @@
 {         interval_set_base_intersect_4_bicremental_types<interval_set, T>();}
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_flip_4_bicremental_types, T, bicremental_types)
+{         interval_set_flip_4_bicremental_types<interval_set, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_itl_interval_set_infix_plus_overload_4_bicremental_types, T, bicremental_types)
 {         interval_set_infix_plus_overload_4_bicremental_types<interval_set, T>();}
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{         interval_set_infix_pipe_overload_4_bicremental_types<interval_set, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_itl_interval_set_infix_et_overload_4_bicremental_types, T, bicremental_types)
 {         interval_set_infix_et_overload_4_bicremental_types<interval_set, T>();}
 
Modified: sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -764,4 +764,34 @@
         BOOST_CHECK_EQUAL(split_a + sep_a,  sep_a  + split_a );
         BOOST_CHECK_EQUAL(split_a + join_a, join_a + split_a);
         BOOST_CHECK_EQUAL(sep_a   + join_a, join_a + sep_a  );
-}
\ No newline at end of file
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_set_mixed_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{
+	interval_set<T>          join_a;
+	separate_interval_set<T> sep_a;
+	split_interval_set<T>    split_a;
+
+	join_a.add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,9));
+	sep_a .add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,11));
+	split_a.add(I_I(0,0)).add(I_D(8,7)).add(I_I(6,11));
+
+	BOOST_CHECK_EQUAL(split_a | sep_a,  sep_a  | split_a );
+	BOOST_CHECK_EQUAL(split_a | join_a, join_a | split_a);
+	BOOST_CHECK_EQUAL(sep_a   | join_a, join_a | sep_a  );
+}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_set_mixed_infix_et_overload_4_bicremental_types, T, bicremental_types)
+{
+	interval_set<T>          join_a;
+	separate_interval_set<T> sep_a;
+	split_interval_set<T>    split_a;
+
+	join_a.add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,9));
+	sep_a .add(I_D(0,4)) .add(I_I(4,6)).add(I_D(5,11));
+	split_a.add(I_I(0,0)).add(I_D(8,7)).add(I_I(6,11));
+
+	BOOST_CHECK_EQUAL(split_a & sep_a,  sep_a  & split_a );
+	BOOST_CHECK_EQUAL(split_a & join_a, join_a & split_a);
+	BOOST_CHECK_EQUAL(sep_a   & join_a, join_a & sep_a  );
+}
Modified: sandbox/itl/libs/itl/test/test_interval_set_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_set_shared.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_interval_set_shared.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -507,6 +507,38 @@
     BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), true );
 }
 
+template <template< class T, 
+                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, T),
+					template<class,ITL_COMPARE>class Interval = interval,
+                    ITL_ALLOC   Alloc   = std::allocator
+                  >class IntervalSet, 
+          class T>
+void interval_set_flip_4_bicremental_types()
+{
+	typedef IntervalSet<T> IntervalSetT;
+	typedef IntervalSetT ISet;
+
+	IntervalSetT set_a, set_b, lhs, rhs;
+	//[0     2)
+	//    [1     3)
+	//[0 1)   [2 3) : {[0 2)} ^= [2 3)
+	BOOST_CHECK_EQUAL(ISet(I_D(0,2)) ^= I_D(1,3), ISet(I_D(0,1)) + I_D(2,3));
+
+	//    [1     3)
+	//[0     2)    
+	//[0 1)   [2 3) : {[1 3)} ^= [0 2)
+	BOOST_CHECK_EQUAL(ISet(I_D(1,3)) ^= I_D(0,2), ISet(I_D(0,1)) + I_D(2,3));
+
+	//[0     2)      (3  5]
+	//    [1      3)
+	//[0 1)   [2  3) (3  5] : a ^= b
+	set_a.add(I_D(0,2)).add(C_I(3,5));
+	set_b.add(I_D(1,3));
+	lhs = set_a;
+	lhs ^= set_b;
+	rhs.add(I_D(0,1)).add(I_D(2,3)).add(C_I(3,5));
+	BOOST_CHECK_EQUAL(lhs, rhs);
+}
 
 template <template< class T, 
                     ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, T),
@@ -535,6 +567,27 @@
                     ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalSet, 
           class T>
+void interval_set_infix_pipe_overload_4_bicremental_types()
+{
+	typedef IntervalSet<T> IntervalSetT;
+	itl::interval<T> itv = I_D(3,5);
+
+	IntervalSetT set_a, set_b;
+	set_a.add(C_D(1,3)).add(I_D(8,9)).add(I_I(6,11));
+	set_b.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+	BOOST_CHECK_EQUAL(set_a | set_b, set_b | set_a);
+	//This checks all cases of is_interval_set_derivative<T>
+	BOOST_CHECK_EQUAL(set_a | itv, itv | set_a);
+	BOOST_CHECK_EQUAL(set_b | MK_v(4), MK_v(4) | set_b);
+}
+
+template <template< class T, 
+                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, T),
+					template<class,ITL_COMPARE>class Interval = interval,
+                    ITL_ALLOC   Alloc   = std::allocator
+                  >class IntervalSet, 
+          class T>
 void interval_set_infix_et_overload_4_bicremental_types()
 {
         typedef IntervalSet<T> IntervalSetT;
Modified: sandbox/itl/libs/itl/test/test_quantifier_map_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_quantifier_map_shared.hpp	(original)
+++ sandbox/itl/libs/itl/test/test_quantifier_map_shared.hpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -14,7 +14,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap1, 
@@ -22,7 +22,7 @@
                    class Traits = neutron_absorber,
                    ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
                    ITL_COMBINE Combine = ITL_COMBINE_INSTANCE(itl::inplace_plus, U),
-                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_star, U),
+                   ITL_SECTION Section = ITL_SECTION_INSTANCE(itl::inplace_et, U),
                    template<class,ITL_COMPARE>class Interval = interval,
                    ITL_ALLOC   Alloc   = std::allocator
                   >class IntervalMap2 
Modified: sandbox/itl/libs/itl/test/test_separate_interval_set/test_separate_interval_set_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_separate_interval_set/test_separate_interval_set_shared.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_separate_interval_set/test_separate_interval_set_shared.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -47,6 +47,10 @@
 {         interval_set_infix_plus_overload_4_bicremental_types<separate_interval_set, T>();}
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{         interval_set_infix_pipe_overload_4_bicremental_types<separate_interval_set, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_itl_interval_set_infix_et_overload_4_bicremental_types, T, bicremental_types)
 {         interval_set_infix_et_overload_4_bicremental_types<interval_set, T>();}
 
Modified: sandbox/itl/libs/itl/test/test_split_interval_map/test_split_interval_map_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_split_interval_map/test_split_interval_map_shared.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_split_interval_map/test_split_interval_map_shared.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -55,5 +55,9 @@
 {         interval_map_infix_plus_overload_4_bicremental_types<split_interval_map, T, int>();}
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_map_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{         interval_map_infix_pipe_overload_4_bicremental_types<split_interval_map, T, int>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_itl_interval_map_infix_et_overload_4_bicremental_types, T, bicremental_types)
 {         interval_map_infix_et_overload_4_bicremental_types<split_interval_map, T, int>();}
Modified: sandbox/itl/libs/itl/test/test_split_interval_set/test_split_interval_set_shared.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_split_interval_set/test_split_interval_set_shared.cpp	(original)
+++ sandbox/itl/libs/itl/test/test_split_interval_set/test_split_interval_set_shared.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -47,6 +47,10 @@
 {         interval_set_infix_plus_overload_4_bicremental_types<split_interval_set, T>();}
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_set_infix_pipe_overload_4_bicremental_types, T, bicremental_types)
+{         interval_set_infix_pipe_overload_4_bicremental_types<split_interval_set, T>();}
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
 (test_itl_interval_set_infix_et_overload_4_bicremental_types, T, bicremental_types)
 {         interval_set_infix_et_overload_4_bicremental_types<interval_set, T>();}
 
Modified: sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp
==============================================================================
--- sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp	(original)
+++ sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -236,9 +236,9 @@
 {
         typedef interval_map<int,nat> QuantifierT;
         QuantifierT sec_map;
-	sec_map += make_pair(interval<int>::rightopen(1,5), 1);
-	sec_map -= make_pair(interval<int>::rightopen(3,7), 2);
-	sec_map += make_pair(interval<int>::rightopen(3,7), 3);
+	sec_map += QuantifierT::value_type(interval<int>::rightopen(1,5), 1);
+	sec_map -= make_pair(interval<int>::rightopen(3,7), static_cast<nat>(2));
+	sec_map += make_pair(interval<int>::rightopen(3,7), static_cast<nat>(3));
         //sec_map *= QuantifierT(make_pair(interval<int>::rightopen(3,7), 1));
         
         QuantifierT sec_map2;
@@ -252,13 +252,10 @@
 
 void misc_test()
 {
-	typedef interval_map<int,int> IMT;
-
-	cout << "f=" << segmentational_fineness<IMT>::value << endl;
-	cout << "IMT > IMT::valueT =" << is_coarser_interval_map_companion<IMT, IMT::value_type>::value << endl;
-	cout << "IMT > IMT::valueT =" << is_interval_map_companion<IMT, IMT::value_type>::value << endl;
-	cout << "IMT > IMT::eleT =" << is_coarser_interval_map_companion<IMT, IMT::domain_mapping_type>::value << endl;
-	cout << "IMT > IMT::eleT =" << is_interval_map_companion<IMT, IMT::domain_mapping_type>::value << endl;
+	typedef interval_set<int> SeT;
+	SeT a(interval<int>::rightopen(0,2));
+	a.flip(interval<int>::rightopen(1,3));
+	cout << a << endl;
 }
 
 int main()
Modified: sandbox/itl/libs/validate/example/labat_single/labat_single.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_single/labat_single.cpp	(original)
+++ sandbox/itl/libs/validate/example/labat_single/labat_single.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -41,7 +41,7 @@
     //map_atomize_plus_pushout.setTrialsCount(1000);
     //map_atomize_plus_pushout.run();
 
-    //typedef BinaryPushout<itl::map<int,double>, itl::split_interval_map<int,double>, Interval::Cluster, inplace_star>
+    //typedef BinaryPushout<itl::map<int,double>, itl::split_interval_map<int,double>, Interval::Cluster, inplace_et>
     //    Map_Cluster_Intersect_DiagramT;
     //LawValidater<Map_Cluster_Intersect_DiagramT, RandomGentor> map_cluster_star_pushout;
     //map_cluster_star_pushout.setTrialsCount(1000);
@@ -54,7 +54,7 @@
 
         //typedef InplaceDistributivity
         //	<split_interval_map<int, itl::set<int>, neutron_absorber >, 
-	//	inplace_star, inplace_plus, itl::std_equal>  TestLawT;
+	//	inplace_et, inplace_plus, itl::std_equal>  TestLawT;
         //LawValidater<TestLawT, RandomGentor> test_law;
         //test_law.setTrialsCount(1000);
 
@@ -65,7 +65,7 @@
         //test_law.setTrialsCount(1000);
 
         //typedef InplaceAssociativity
-	//   <split_interval_map<int, int, neutron_emitter >, inplace_star>  TestLawT;
+	//   <split_interval_map<int, int, neutron_emitter >, inplace_et>  TestLawT;
         //LawValidater<TestLawT, RandomGentor> test_law;
         //test_law.setTrialsCount(1000);
 
@@ -79,10 +79,15 @@
         //LawValidater<TestLawT, RandomGentor> test_law;
         //test_law.setTrialsCount(1000);
 
-	typedef InplaceInverseRemovability
-	   <split_interval_map<int, int, neutron_emitter>, inplace_plus>  TestLawT;
+	//typedef InplaceInverseRemovability
+	//   <split_interval_map<int, int, neutron_emitter>, inplace_plus>  TestLawT;
+	//LawValidater<TestLawT, RandomGentor> test_law;
+	//test_law.setTrialsCount(1000);
+
+	typedef InplaceFlip
+		<split_interval_map<int, int, neutron_polluter > >  TestLawT;
         LawValidater<TestLawT, RandomGentor> test_law;
-	test_law.setTrialsCount(1000);
+	test_law.setTrialsCount(10000);
 
         std::cout << "Start\n";
         ptime start(microsec_clock::local_time());
Modified: sandbox/itl/libs/validate/example/labatea/labatea.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labatea/labatea.cpp	(original)
+++ sandbox/itl/libs/validate/example/labatea/labatea.cpp	2009-01-26 11:30:32 EST (Mon, 26 Jan 2009)
@@ -51,7 +51,7 @@
     //map_atomize_plus_pushout.setTrialsCount(1000);
     //map_atomize_plus_pushout.run();
 
-    //typedef BinaryPushout<itl::map<int,double>, itl::split_interval_map<int,double>, Interval::Cluster, inplace_star>
+    //typedef BinaryPushout<itl::map<int,double>, itl::split_interval_map<int,double>, Interval::Cluster, inplace_et>
     //    Map_Cluster_Intersect_DiagramT;
     //LawValidater<Map_Cluster_Intersect_DiagramT, RandomGentor> map_cluster_star_pushout;
     //map_cluster_star_pushout.setTrialsCount(1000);
@@ -64,7 +64,7 @@
 
         //typedef InplaceDistributivity
         //	<split_interval_map<int, itl::set<int>, neutron_absorber >, 
-	//	inplace_star, inplace_plus, itl::std_equal>  TestLawT;
+	//	inplace_et, inplace_plus, itl::std_equal>  TestLawT;
         //LawValidater<TestLawT, RandomGentor> test_law;
         //test_law.setTrialsCount(1000);