Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65363 - in sandbox/itl: boost/itl boost/itl/detail boost/itl/functions boost/itl/type_traits libs/itl/test
From: afojgo_at_[hidden]
Date: 2010-09-09 12:32:23


Author: jofaber
Date: 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
New Revision: 65363
URL: http://svn.boost.org/trac/boost/changeset/65363

Log:
Refactoring: Extraction intersection member functions from interval_base_map. Stable{msvc-9.0, gcc-3.4.4}
Added:
   sandbox/itl/boost/itl/type_traits/is_fragment_type_of.hpp (contents, props changed)
   sandbox/itl/libs/itl/test/test_calls.hpp (contents, props changed)
Text files modified:
   sandbox/itl/boost/itl/detail/interval_map_algo.hpp | 94 +++++++++----------
   sandbox/itl/boost/itl/detail/interval_map_functors.hpp | 190 +++++++++++++++++++--------------------
   sandbox/itl/boost/itl/detail/map_functors.hpp | 20 ++-
   sandbox/itl/boost/itl/discrete_interval.hpp | 12 --
   sandbox/itl/boost/itl/functions.hpp | 168 ++++++++++++++++++++++++++++++++---
   sandbox/itl/boost/itl/functions/associative_element_container.hpp | 36 +++---
   sandbox/itl/boost/itl/interval_base_map.hpp | 134 +++++++++++++---------------
   sandbox/itl/boost/itl/interval_base_set.hpp | 58 ++++--------
   sandbox/itl/boost/itl/interval_set.hpp | 1
   sandbox/itl/boost/itl/type_traits/is_combinable.hpp | 4
   sandbox/itl/boost/itl/type_traits/is_key_container_of.hpp | 6
   sandbox/itl/libs/itl/test/Jamfile.v2 | 2
   sandbox/itl/libs/itl/test/test_interval_map_mixed.hpp | 130 +++++++++++++-------------
   sandbox/itl/libs/itl/test/test_interval_map_shared.hpp | 104 ++++++++++----------
   sandbox/itl/libs/itl/test/test_interval_set_mixed.hpp | 12 +-
   sandbox/itl/libs/itl/test/test_interval_set_shared.hpp | 51 +++++-----
   sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp | 4
   sandbox/itl/libs/itl/test/test_value_maker.hpp | 1
   18 files changed, 563 insertions(+), 464 deletions(-)

Modified: sandbox/itl/boost/itl/detail/interval_map_algo.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/interval_map_algo.hpp (original)
+++ sandbox/itl/boost/itl/detail/interval_map_algo.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -211,17 +211,17 @@
 template <class Type, class Combiner>
 inline std::pair<typename Type::iterator, bool>
 informing_add( Type& object,
- const typename Type::iterator& prior_,
+ const typename Type::iterator& prior_,
          const typename Type::interval_type& inter_val,
- const typename Type::codomain_type& co_val )
+ const typename Type::codomain_type& co_val )
 {
     typedef typename Type::value_type value_type;
     typedef typename Type::iterator iterator;
- typedef typename on_neutric<Type,Combiner,
- absorbs_neutrons<Type>::value>::type on_neutric_;
+ typedef typename on_neutric<Type,Combiner,
+ absorbs_neutrons<Type>::value>::type on_neutric_;
 
     // Never try to insert a neutron into a neutron absorber here:
- BOOST_ASSERT(!(on_neutric_::is_absorbable(co_val)));
+ BOOST_ASSERT(!(on_neutric_::is_absorbable(co_val)));
 
     iterator inserted_
         = object._insert(prior_, value_type(inter_val, Combiner::neutron()));
@@ -238,14 +238,14 @@
 template <class Type>
 inline std::pair<typename Type::iterator, bool>
 informing_insert( Type& object,
- const typename Type::iterator& prior_,
+ const typename Type::iterator& prior_,
          const typename Type::interval_type& inter_val,
- const typename Type::codomain_type& co_val )
+ const typename Type::codomain_type& co_val )
 {
     typedef typename Type::value_type value_type;
     typedef typename Type::iterator iterator;
 
- iterator inserted_
+ iterator inserted_
         = object._insert(prior_, value_type(inter_val, co_val));
 
     if(inserted_ == prior_)
@@ -304,8 +304,8 @@
 
     static iterator handle_inserted(Type& object, iterator it_)
     {
- return join_neighbours(object, it_);
- }
+ return join_neighbours(object, it_);
+ }
 
     static void handle_inserted(Type& object, iterator inserted_, iterator& it_)
     {
@@ -657,14 +657,14 @@
         return object.end();
 
     const codomain_type& co_val = addend.second;
- if(on_neutric_::is_absorbable(co_val))
+ if(on_neutric_::is_absorbable(co_val))
         return object.end();
 
     std::pair<iterator,bool> insertion
         = _map_insert<Type,Combiner>(object, inter_val, co_val);
 
     if(insertion.second)
- return on_style_::handle_inserted(object, insertion.first);
+ return on_style_::handle_inserted(object, insertion.first);
     else
     {
         // Detect the first and the end iterator of the collision sequence
@@ -678,7 +678,7 @@
         Interval_Set::add_front (object, rest_interval, it_ );
         Interval_Map::add_main<Type,Combiner>(object, rest_interval, co_val, it_, last_);
         Interval_Map::add_rear<Type,Combiner>(object, rest_interval, co_val, it_ );
- return it_;
+ return it_;
     }
 }
 
@@ -701,14 +701,14 @@
         return prior_;
 
     const codomain_type& co_val = addend.second;
- if(on_neutric_::is_absorbable(co_val))
+ if(on_neutric_::is_absorbable(co_val))
         return prior_;
 
     std::pair<iterator,bool> insertion
         = informing_add<Type,Combiner>(object,prior_, inter_val, co_val);
 
     if(insertion.second)
- return on_style_::handle_inserted(object, insertion.first);
+ return on_style_::handle_inserted(object, insertion.first);
     else
     {
         // Detect the first and the end iterator of the collision sequence
@@ -909,7 +909,7 @@
     std::pair<iterator,bool> insertion = object._insert(addend);
 
     if(insertion.second)
- return on_style_::handle_inserted(object, insertion.first);
+ return on_style_::handle_inserted(object, insertion.first);
     else
     {
         // Detect the first and the end iterator of the collision sequence
@@ -918,7 +918,7 @@
         //assert((++last_) == this->_map.upper_bound(inter_val));
         iterator it_ = first_;
         Interval_Map::insert_main(object, inter_val, co_val, it_, last_);
- return it_;
+ return it_;
     }
 }
 
@@ -948,7 +948,7 @@
         = informing_insert(object, prior_, inter_val, co_val);
 
     if(insertion.second)
- return on_style_::handle_inserted(object, insertion.first);
+ return on_style_::handle_inserted(object, insertion.first);
     {
         // Detect the first and the end iterator of the collision sequence
         std::pair<iterator,iterator> overlap = object.equal_range(inter_val);
@@ -960,13 +960,38 @@
 }
 
 
-
-
 //==============================================================================
 //= Erasure
 //==============================================================================
 
 template<class Type>
+void erase_rest( Type& object,
+ typename Type::interval_type& inter_val,
+ const typename Type::codomain_type& co_val,
+ typename Type::iterator& it_,
+ const typename Type::iterator& last_ )
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+
+ // For all intervals within loop: it_->first are contained_in inter_val
+ while(it_ != last_)
+ if(it_->second == co_val)
+ object.erase(it_++);
+ else it_++;
+
+ //erase_rear:
+ if(it_->second == co_val)
+ {
+ interval_type right_resid = left_subtract(it_->first, inter_val);
+ if(itl::is_empty(right_resid))
+ object.erase(it_);
+ else
+ const_cast<interval_type&>(it_->first) = right_resid;
+ }
+}
+
+template<class Type>
 void erase(Type& object, const typename Type::value_type& minuend)
 {
     typedef typename Type::interval_type interval_type;
@@ -1031,35 +1056,6 @@
     }
 }
 
-template<class Type>
-void erase_rest( Type& object,
- typename Type::interval_type& inter_val,
- const typename Type::codomain_type& co_val,
- typename Type::iterator& it_,
- const typename Type::iterator& last_ )
-{
- typedef typename Type::interval_type interval_type;
- typedef typename Type::iterator iterator;
-
- // For all intervals within loop: it_->first are contained_in inter_val
- while(it_ != last_)
- if(it_->second == co_val)
- object.erase(it_++);
- else it_++;
-
- //erase_rear:
- if(it_->second == co_val)
- {
- interval_type right_resid = left_subtract(it_->first, inter_val);
- if(itl::is_empty(right_resid))
- object.erase(it_);
- else
- const_cast<interval_type&>(it_->first) = right_resid;
- }
-}
-
-
-
 } // namespace Interval_Map
 
 }} // namespace itl boost

Modified: sandbox/itl/boost/itl/detail/interval_map_functors.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/interval_map_functors.hpp (original)
+++ sandbox/itl/boost/itl/detail/interval_map_functors.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -24,43 +24,43 @@
 template<class MapT>
 struct interval_map_contains
 {
- typedef typename MapT::element_type element_type;
- typedef typename MapT::segment_type segment_type;
- typedef typename MapT::interval_type interval_type;
- typedef typename MapT::const_iterator const_iterator;
-
- static bool apply(const MapT& super, const element_type& key_value_pair)
- {
- const_iterator it_ = super.find(key_value_pair.key);
- return it_ != super.end() && it_->second == key_value_pair.data;
- }
-
- static bool apply(const MapT& super, const segment_type& sub_segment)
- {
- interval_type sub_interval = sub_segment.first;
- if(itl::is_empty(sub_interval))
- return true;
-
- std::pair<const_iterator, const_iterator> exterior = super.equal_range(sub_interval);
- if(exterior.first == exterior.second)
- return false;
-
- const_iterator last_overlap = prior(exterior.second);
-
- if(!(sub_segment.second == exterior.first->second) )
- return false;
-
- return
- itl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
- && Interval_Map::is_joinable(super, exterior.first, last_overlap);
- }
-
- template<class CoMapT>
- static typename enable_if<is_interval_map<CoMapT>, bool>::type
- apply(const MapT& super, const CoMapT& sub)
- {
- return Interval_Set::within(sub, super);
- }
+ typedef typename MapT::element_type element_type;
+ typedef typename MapT::segment_type segment_type;
+ typedef typename MapT::interval_type interval_type;
+ typedef typename MapT::const_iterator const_iterator;
+
+ static bool apply(const MapT& super, const element_type& key_value_pair)
+ {
+ const_iterator it_ = super.find(key_value_pair.key);
+ return it_ != super.end() && it_->second == key_value_pair.data;
+ }
+
+ static bool apply(const MapT& super, const segment_type& sub_segment)
+ {
+ interval_type sub_interval = sub_segment.first;
+ if(itl::is_empty(sub_interval))
+ return true;
+
+ std::pair<const_iterator, const_iterator> exterior = super.equal_range(sub_interval);
+ if(exterior.first == exterior.second)
+ return false;
+
+ const_iterator last_overlap = prior(exterior.second);
+
+ if(!(sub_segment.second == exterior.first->second) )
+ return false;
+
+ return
+ itl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
+ && Interval_Map::is_joinable(super, exterior.first, last_overlap);
+ }
+
+ template<class CoMapT>
+ static typename enable_if<is_interval_map<CoMapT>, bool>::type
+ apply(const MapT& super, const CoMapT& sub)
+ {
+ return Interval_Set::within(sub, super);
+ }
 };
 
 //------------------------------------------------------------------------------
@@ -68,75 +68,73 @@
 template<class MapT, bool is_total>
 struct interval_map_contains_key
 {
- typedef typename MapT::domain_type domain_type;
- typedef typename MapT::interval_type interval_type;
- typedef typename MapT::const_iterator const_iterator;
-
- static bool apply(const MapT&, const domain_type&);
- static bool apply(const MapT&, const interval_type&);
-
- template<class SetT>
- static typename enable_if<is_interval_set<SetT>, bool>::type
- apply(const MapT&, const SetT&);
+ typedef typename MapT::domain_type domain_type;
+ typedef typename MapT::interval_type interval_type;
+ typedef typename MapT::const_iterator const_iterator;
+
+ static bool apply(const MapT&, const domain_type&);
+ static bool apply(const MapT&, const interval_type&);
+
+ template<class SetT>
+ static typename enable_if<is_interval_set<SetT>, bool>::type
+ apply(const MapT&, const SetT&);
 };
 
 template<class MapT>
 struct interval_map_contains_key<MapT, true>
-{ // is_total
- typedef typename MapT::domain_type domain_type;
- typedef typename MapT::interval_type interval_type;
- typedef typename MapT::set_type set_type;
-
- //JODO enable_if< is_key_type_of >
- // Key objects are always contained in a total map
- static bool apply(const MapT&, const domain_type& ){ return true; }
- static bool apply(const MapT&, const interval_type&){ return true; }
-
- template<class SetT>
- static typename enable_if<is_interval_set<SetT>, bool>::type
- apply(const MapT&, const SetT&){ return true; }
+{ // is_total
+ typedef typename MapT::domain_type domain_type;
+ typedef typename MapT::interval_type interval_type;
+ typedef typename MapT::set_type set_type;
+
+ //JODO enable_if< is_key_type_of >
+ // Key objects are always contained in a total map
+ static bool apply(const MapT&, const domain_type& ){ return true; }
+ static bool apply(const MapT&, const interval_type&){ return true; }
+
+ template<class SetT>
+ static typename enable_if<is_interval_set<SetT>, bool>::type
+ apply(const MapT&, const SetT&){ return true; }
 };
 
 template<class MapT>
 struct interval_map_contains_key<MapT, false>
-{ // !is_total
- typedef typename MapT::domain_type domain_type;
- typedef typename MapT::interval_type interval_type;
- typedef typename MapT::set_type set_type;
-
- typedef typename MapT::const_iterator const_iterator;
-
- static bool apply(const MapT& super, const domain_type& key)
- {
- return super.find(key) != super.end();
- }
-
- static bool apply(const MapT& super, const interval_type& sub_interval)
- {
- if(itl::is_empty(sub_interval))
- return true;
-
- std::pair<const_iterator, const_iterator> exterior = super.equal_range(sub_interval);
- if(exterior.first == exterior.second)
- return false;
-
- const_iterator last_overlap = prior(exterior.second);
-
- return
- itl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
- && Interval_Set::is_joinable(super, exterior.first, last_overlap);
- }
-
- template<class SetT>
- static typename enable_if<is_interval_set<SetT>, bool>::type
- apply(const MapT& super, const SetT& sub)
- {
- return Interval_Set::within(sub, super);
- }
-
+{ // !is_total
+ typedef typename MapT::domain_type domain_type;
+ typedef typename MapT::interval_type interval_type;
+ typedef typename MapT::set_type set_type;
+
+ typedef typename MapT::const_iterator const_iterator;
+
+ static bool apply(const MapT& super, const domain_type& key)
+ {
+ return super.find(key) != super.end();
+ }
+
+ static bool apply(const MapT& super, const interval_type& sub_interval)
+ {
+ if(itl::is_empty(sub_interval))
+ return true;
+
+ std::pair<const_iterator, const_iterator> exterior = super.equal_range(sub_interval);
+ if(exterior.first == exterior.second)
+ return false;
+
+ const_iterator last_overlap = prior(exterior.second);
+
+ return
+ itl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
+ && Interval_Set::is_joinable(super, exterior.first, last_overlap);
+ }
+
+ template<class SetT>
+ static typename enable_if<is_interval_set<SetT>, bool>::type
+ apply(const MapT& super, const SetT& sub)
+ {
+ return Interval_Set::within(sub, super);
+ }
 };
 
-
 }} // namespace itl boost
 
 #endif

Modified: sandbox/itl/boost/itl/detail/map_functors.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/map_functors.hpp (original)
+++ sandbox/itl/boost/itl/detail/map_functors.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -322,14 +322,11 @@
     typedef typename map_type::codomain_combine codomain_combine;
     typedef typename map_type::const_iterator const_iterator;
 
- BOOST_STATIC_CONSTANT(bool, absorbs = (absorbs_neutrons<MapT>::value));
-
     static map_type& apply(map_type& section, const map_type& object, const domain_type& key_value)
     {
         const_iterator it_ = object.find(key_value);
         if(it_ != object.end())
- //itl::add(section, *it_);
- map_add<map_type,codomain_combine,absorbs>::apply(section, *it_);
+ itl::add(section, *it_);
         return section;
     }
 
@@ -391,13 +388,22 @@
 
 template<class MapT>
 struct map_inplace_intersect<MapT, true>
-{ // is_total
+{ // is_total
     typedef MapT map_type;
     typedef typename map_type::domain_type domain_type;
     typedef typename map_type::element_type element_type;
 
- static map_type& apply(map_type& object, const element_type& operand){return object += operand;}
- static map_type& apply(map_type& object, const map_type& operand) {return object += operand;}
+ static map_type& apply(map_type& object, const element_type& operand)
+ {
+ object += operand;
+ return object;
+ }
+
+ static map_type& apply(map_type& object, const map_type& operand)
+ {
+ object += operand;
+ return object;
+ }
 };
 
 template<class MapT>

Modified: sandbox/itl/boost/itl/discrete_interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/discrete_interval.hpp (original)
+++ sandbox/itl/boost/itl/discrete_interval.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -70,18 +70,6 @@
     domain_type upper()const { return _upb; }
     interval_bounds bounds()const{ return _bounds; }
 
- /*CL
- domain_type first()const
- {
- return _bounds.left().bits()==2 ? _lwb : succ(_lwb);
- }
-
- DomainT last()const
- {
- return _bounds.right().bits()==1 ? _upb : pred(_upb);
- }
- */
-
     static discrete_interval open (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::open()); }
     static discrete_interval rightopen(const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::right_open());}
     static discrete_interval leftopen (const DomainT& lo, const DomainT& up){ return discrete_interval(lo, up, interval_bounds::left_open()); }

Modified: sandbox/itl/boost/itl/functions.hpp
==============================================================================
--- sandbox/itl/boost/itl/functions.hpp (original)
+++ sandbox/itl/boost/itl/functions.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -19,6 +19,7 @@
 #include <boost/itl/type_traits/is_interval_joiner.hpp>
 #include <boost/itl/type_traits/is_element_container.hpp>
 #include <boost/itl/type_traits/is_combinable.hpp>
+#include <boost/itl/type_traits/is_fragment_type_of.hpp>
 #include <boost/itl/detail/interval_map_functors.hpp>
 #include <boost/itl/detail/interval_map_algo.hpp>
 
@@ -37,7 +38,7 @@
 //------------------------------------------------------------------------------
 
 template<class Type, class OperandT>
-typename enable_if<has_same_concept<is_interval_map, Type, OperandT>,
+typename enable_if<has_same_concept<is_interval_map, Type, OperandT>, //JODO parameter compatibility
                    bool>::type
 contains(const Type& super, const OperandT& sub)
 {
@@ -518,38 +519,36 @@
 //= Intersection
 //==============================================================================
 //------------------------------------------------------------------------------
-//- Intersection add_intersection
+//- Intersection add_intersection <interval_set>
 //------------------------------------------------------------------------------
 template<class Type>
-typename enable_if<is_interval_set<Type>, Type>::type&
+typename enable_if<is_interval_set<Type>, void>::type
 add_intersection(Type& section, const Type& object,
- const typename Type::domain_type& operand)
+ const typename Type::domain_type& operand)
 {
     typedef typename Type::const_iterator const_iterator;
     const_iterator found = object.find(operand);
     if(found != object.end())
         itl::add(section, operand);
-
- return section;
 }
 
 
 template<class Type>
-typename enable_if<is_interval_set<Type>, Type>::type&
+typename enable_if<is_interval_set<Type>, void>::type
 add_intersection(Type& section, const Type& object,
- const typename Type::segment_type& segment)
+ const typename Type::segment_type& segment)
 {
     typedef typename Type::const_iterator const_iterator;
     typedef typename Type::iterator iterator;
     typedef typename Type::interval_type interval_type;
 
     if(itl::is_empty(segment))
- return section;
+ return;
 
     std::pair<const_iterator, const_iterator> exterior
         = object.equal_range(segment);
     if(exterior.first == exterior.second)
- return section;
+ return;
 
     iterator prior_ = section.end();
     for(const_iterator it_=exterior.first; it_ != exterior.second; it_++)
@@ -558,32 +557,169 @@
         if(!itl::is_empty(common_interval))
             prior_ = section._insert(prior_, common_interval);
     }
- return section;
 }
 
 
 template<class Type, class OperandT>
 typename enable_if<mpl::and_<is_interval_set<Type>,
                              combines_right_to_interval_set<Type, OperandT> >,
- Type>::type&
+ void>::type
 add_intersection(Type& section, const Type& object, const OperandT& operand)
 {
     typedef typename OperandT::const_iterator const_iterator;
 
     if(operand.empty())
- return section;
+ return;
 
     const_iterator common_lwb, common_upb;
     if(!Set::common_range(common_lwb, common_upb, operand, object))
- return section;
+ return;
 
     const_iterator it_ = common_lwb;
     while(it_ != common_upb)
         itl::add_intersection(section, object, OperandT::key_value(it_++));
+}
+
+
+//------------------------------------------------------------------------------
+//- Intersection add_intersection<IntervalMaps> for key_types
+//------------------------------------------------------------------------------
+
+//CL? JODO
+template<class Type, class OperandT>
+typename enable_if<mpl::and_< is_total<Type>
+ , is_interval_map_fragment_type_of<OperandT, Type> >, void>::type
+add_intersection(Type& section, const Type& object, const OperandT& operand)
+{
+ section += object;
+ section += operand;
+}
+
+template<class Type>
+typename enable_if<mpl::and_< mpl::not_<is_total<Type> >, is_interval_map<Type> >, void>::type
+add_intersection(Type& section, const Type& object, const typename Type::element_type& operand)
+{
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::interval_type interval_type;
+ add_intersection(section, object,
+ segment_type(interval_type(operand.key), operand.data));
+}
+
+template<class Type>
+typename enable_if<mpl::and_< mpl::not_<is_total<Type> >, is_interval_map<Type> >, void>::type
+add_intersection(Type& section, const Type& object, const typename Type::segment_type& operand)
+{
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::value_type value_type;
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::codomain_combine codomain_combine;
+ typedef typename Type::codomain_intersect codomain_intersect;
+
+ interval_type inter_val = operand.first;
+ if(itl::is_empty(inter_val))
+ return;
 
- return section;
+ std::pair<const_iterator, const_iterator> exterior
+ = object.equal_range(inter_val);
+ if(exterior.first == exterior.second)
+ return;
+
+ for(const_iterator it_=exterior.first; it_ != exterior.second; it_++)
+ {
+ interval_type common_interval = it_->first & inter_val;
+ if(!itl::is_empty(common_interval))
+ {
+ Interval_Map::add<Type,codomain_combine> (section, value_type(common_interval, it_->second) );
+ Interval_Map::add<Type,codomain_intersect>(section, value_type(common_interval, operand.second));
+ }
+ }
 }
 
+template<class Type, class MapT>
+typename enable_if<mpl::and_< mpl::not_<is_total<Type> >
+ , is_concept_compatible<is_interval_map, Type, MapT> >, void>::type
+add_intersection(Type& section, const Type& object, const MapT& operand)
+{
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::interval_type interval_type;
+ typedef typename MapT::const_iterator const_iterator;
+
+ if(operand.empty())
+ return;
+ const_iterator common_lwb, common_upb;
+ if(!Set::common_range(common_lwb, common_upb, operand, object))
+ return;
+ const_iterator it_ = common_lwb;
+ while(it_ != common_upb)
+ add_intersection(section, object, *it_++);
+}
+
+//------------------------------------------------------------------------------
+//- Intersection add_intersection<IntervalMaps> for fragment_types
+//------------------------------------------------------------------------------
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::domain_type& key_value)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::segment_type segment_type;
+ typedef typename Type::const_iterator const_iterator;
+
+ const_iterator it_ = object.find(key_value);
+ if(it_ != object.end())
+ add(section, segment_type(interval_type(key_value),it_->second));
+}
+
+template<class Type>
+typename enable_if<is_interval_map<Type>, void>::type
+add_intersection(Type& section, const Type& object,
+ const typename Type::interval_type& inter_val)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::value_type value_type;
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::iterator iterator;
+
+ if(itl::is_empty(inter_val))
+ return;
+
+ std::pair<const_iterator, const_iterator> exterior
+ = object.equal_range(inter_val);
+ if(exterior.first == exterior.second)
+ return;
+
+ iterator prior_ = section.end();
+ for(const_iterator it_=exterior.first; it_ != exterior.second; it_++)
+ {
+ interval_type common_interval = it_->first & inter_val;
+ if(!itl::is_empty(common_interval))
+ prior_ = add(section, prior_,
+ value_type(common_interval, it_->second) );
+ }
+}
+
+template<class Type, class KeySetT>
+typename enable_if<is_concept_combinable<is_interval_map, is_interval_set, Type, KeySetT>, void>::type
+add_intersection(Type& section, const Type& object, const KeySetT& key_set)
+{
+ typedef typename KeySetT::const_iterator const_iterator;
+
+ if(itl::is_empty(key_set))
+ return;
+
+ const_iterator common_lwb, common_upb;
+ if(!Set::common_range(common_lwb, common_upb, key_set, object))
+ return;
+
+ const_iterator it_ = common_lwb;
+ while(it_ != common_upb)
+ add_intersection(section, object, *it_++);
+}
+
+
 
 //------------------------------------------------------------------------------
 //- Intersection &=, &
@@ -593,7 +729,7 @@
 operator &= (Type& object, const OperandT& operand)
 {
     Type intersection;
- object.add_intersection(intersection, operand);
+ add_intersection(intersection, object, operand);
     object.swap(intersection);
     return object;
 }

Modified: sandbox/itl/boost/itl/functions/associative_element_container.hpp
==============================================================================
--- sandbox/itl/boost/itl/functions/associative_element_container.hpp (original)
+++ sandbox/itl/boost/itl/functions/associative_element_container.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -24,6 +24,24 @@
 
 
 //==============================================================================
+//= Size
+//==============================================================================
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
+size(const Type& object)
+{
+ return itl::iterative_size(object);
+}
+
+template<class Type>
+typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
+cardinality(const Type& object)
+{
+ return itl::iterative_size(object);
+}
+
+
+//==============================================================================
 //= Containedness
 //==============================================================================
 
@@ -88,24 +106,6 @@
     return itl::within(sub, super);
 }
 
-//==============================================================================
-//= Size
-//==============================================================================
-
-template<class Type>
-typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
-size(const Type& object)
-{
- return itl::iterative_size(object);
-}
-
-template<class Type>
-typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
-cardinality(const Type& object)
-{
- return itl::iterative_size(object);
-}
-
 
 //==============================================================================
 //= Equivalences and Orderings

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 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -126,7 +126,16 @@
     /// Inverse Combine functor for codomain value aggregation
     typedef typename inverse<codomain_combine>::type inverse_codomain_combine;
     /// Intersection functor for codomain values
- typedef ITL_SECTION_CODOMAIN(Section,CodomainT) codomain_intersect;
+ //CL typedef ITL_SECTION_CODOMAIN(Section,CodomainT) codomain_intersect;
+
+ typedef typename mpl::if_
+ <has_set_semantics<codomain_type>
+ , ITL_SECTION_CODOMAIN(Section,CodomainT)
+ , codomain_combine
+ >::type codomain_intersect; //JODO extra metafuction?
+ //JODO What, if codomain is not a set but the user want's to use a special intersection functor?
+
+
     /// Inverse Combine functor for codomain value intersection
     typedef typename inverse<codomain_intersect>::type inverse_codomain_intersect;
 
@@ -225,56 +234,24 @@
     //= Containedness
     //==========================================================================
     /** clear the map */
- void clear() { _map.clear(); }
+ void clear() { itl::clear(*that()); }
 
     /** is the map empty? */
- bool empty()const { return _map.empty(); }
-
- //--- contains: set view ---------------------------------------------------
- /** Does the map contain the domain element \c key? */
- bool contains(const domain_type& key)const
- {
- return Interval_Map::contains(*this, key);
- }
+ bool empty()const { return itl::is_empty(*that()); }
 
- /** Does the map contain the interval \c sub_interval ? */
- bool contains(const interval_type& sub_interval)const
+
+ /** Does the map contain some object \c sub of type \c CoType */
+ template<class CoType>
+ bool contains(const CoType& sub)const
     {
- return Interval_Map::contains(*this, sub_interval);
+ return itl::contains(*that(), sub);
     }
 
- /** Does the map contain the key key set \c sub_set ? */
- template<class SetType>
- bool contains(const interval_base_set<SetType,DomainT,Compare,Interval,Alloc>& sub_set)const
+ /** Is <tt>*this</tt> container within <tt>super</tt>? */
+ template<class CoType>
+ bool within(const CoType& super)const
     {
- return Interval_Set::within(sub_set, *this);
- }
-
- /** Does the map contain the <tt>key_value_pair = (key,value)</tt>? */
- bool contains(const element_type& key_value_pair)const
- {
- return contains(value_type(interval_type(key_value_pair.key),
- key_value_pair.data));
- }
-
- /** Does the map contain all element value pairs represented by the
- \c interval_value_pair ? */
- bool contains(const segment_type& interval_value_pair)const;
-
- /** Does <tt>*this</tt> container contain <tt>sub</tt>? */
- template<class MapType>
- bool contains(const interval_base_map<MapType,DomainT,CodomainT,Traits,
- Compare,Combine,Section,Interval,Alloc>& sub)const
- {
- return sub.contained_in(*this);
- }
-
- /** <tt>*this</tt> is subset of <tt>super</tt>? */
- template<class MapType>
- bool contained_in(const interval_base_map<MapType,DomainT,CodomainT,Traits,
- Compare,Combine,Section,Interval,Alloc>& super)const
- {
- return Interval_Set::within(*this, super);
+ return itl::within(*that(), super);
     }
 
     //==========================================================================
@@ -293,38 +270,48 @@
         return itl::cardinality(*that());
     }
 
- /** The length of the interval container which is the sum of
- interval lengths */
- difference_type length()const;
+ /** The length of the interval container which is the sum of interval lengths */
+ difference_type length()const
+ {
+ return itl::length(*that());
+ }
 
     /** Number of intervals which is also the size of the
         iteration over the object */
- size_t interval_count()const { return _map.size(); }
+ size_t interval_count()const
+ {
+ return itl::interval_count(*that());
+ }
 
     /** Size of the iteration over this container */
- size_t iterative_size()const { return _map.size(); }
+ size_t iterative_size()const
+ {
+ return _map.size();
+ }
 
     //==========================================================================
     //= Range
     //==========================================================================
 
- /** Lower bound of the first interval */
- DomainT lower()const
- { return empty()? interval_type().lower() : (*(_map.begin())).first.lower(); }
-
- /** Upper bound of the last interval */
- DomainT upper()const
- { return empty()? interval_type().upper() : (*(_map.rbegin())).first.upper(); }
-
- /** Smallest element of the map (wrt. the partial ordering on DomainT).
- first() does not exist for continuous datatypes and open interval
- bounds. */
- DomainT first()const { return (*(_map.begin())).first.first(); }
-
- /** Largest element of the map (wrt. the partial ordering on DomainT).
- last() does not exist for continuous datatypes and open interval
- bounds. */
- DomainT last()const { return (*(_map.rbegin())).first.last(); }
+ //JODO remove lower, upper, first, last from the interface of all interval containers and docs
+
+ //CL .. /** Lower bound of the first interval */
+ //DomainT lower()const
+ //{ return empty()? interval_type().lower() : (*(_map.begin())).first.lower(); }
+
+ ///** Upper bound of the last interval */
+ //DomainT upper()const
+ //{ return empty()? interval_type().upper() : (*(_map.rbegin())).first.upper(); }
+
+ ///** Smallest element of the map (wrt. the partial ordering on DomainT).
+ // first() does not exist for continuous datatypes and open interval
+ // bounds. */
+ //DomainT first()const { return (*(_map.begin())).first.first(); }
+
+ ///** Largest element of the map (wrt. the partial ordering on DomainT).
+ // last() does not exist for continuous datatypes and open interval
+ // bounds. */
+ //DomainT last()const { return (*(_map.rbegin())).first.last(); }
 
 
     //==========================================================================
@@ -337,7 +324,10 @@
         return _map.find(interval_type(key));
     }
 
- const_iterator find(const key_type& key)const{ return _map.find(key); }
+ const_iterator find(const key_type& key)const
+ {
+ return _map.find(key);
+ }
 
     /** Total select function. */
     codomain_type operator()(const domain_type& key)const
@@ -357,7 +347,7 @@
         This function is not public, because the `codomain_combine` shall be
         an invariant for all itl maps.*/
     template<class Combiner>
- SubType& _add(const segment_type& interval_value_pair)
+ SubType& _add(const segment_type& interval_value_pair)
     {
         that()->template add_<Combiner>(interval_value_pair);
         return *that();
@@ -852,7 +842,7 @@
 } ;
 
 
-
+/*CL
 //==============================================================================
 //= Containedness
 //==============================================================================
@@ -868,12 +858,12 @@
 {
     return Interval_Map::contains(*this, sub_segment);
 }
-
+*/
 
 //==============================================================================
 //= Size
 //==============================================================================
-
+/*CL
 template
 <
     class SubType, class DomainT, class CodomainT, class Traits,
@@ -890,7 +880,7 @@
         length += itl::length(it_->first);
     return length;
 }
-
+*/
 //==============================================================================
 //= Intersection
 //==============================================================================

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 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -30,6 +30,12 @@
 {
 
 //JODO Forward 4 gcc-3.4.4 -----------------------------------------------------
+
+template<class Type, class OperandT>
+typename enable_if<has_same_concept<is_interval_set, Type, OperandT>, bool>::type
+contains(const Type& super, const OperandT& sub);
+
+
 template<class Type>
 typename enable_if<is_interval_container<Type>, std::size_t>::type
 interval_count(const Type&);
@@ -75,17 +81,17 @@
 
 //------------------------------------------------------------------------------
 template<class Type>
-typename enable_if<is_interval_set<Type>, Type>::type&
+typename enable_if<is_interval_set<Type>, void>::type
 add_intersection(Type&, const Type&, const typename Type::domain_type&);
 
 template<class Type>
-typename enable_if<is_interval_set<Type>, Type>::type&
+typename enable_if<is_interval_set<Type>, void>::type
 add_intersection(Type&, const Type&, const typename Type::segment_type&);
 
 template<class Type, class OperandT>
 typename enable_if<mpl::and_<is_interval_set<Type>,
                              combines_right_to_interval_set<Type, OperandT> >,
- Type>::type&
+ void>::type
 add_intersection(Type&, const Type&, const OperandT&);
 
 //------------------------------------------------------------------------------
@@ -252,48 +258,22 @@
     /** is the container empty? */
     bool empty()const { return itl::is_empty(*that()); }
 
- /** Does the container contain the element \c key ? */
- bool contains(const element_type& key)const
- {
- return itl::contains(*that(), key);
- }
 
- /** Does the container contain the interval \c sub_interval ? */
- bool contains(const segment_type& sub_interval)const
- {
- return itl::contains(*that(), sub_interval);
+ /** Does the set contain some object \c sub of type \c CoType */
+ template<class CoType>
+ bool contains(const CoType& sub)const
+ {
+ return itl::contains(*that(), sub);
     }
 
-
- /** Does the container contain the subcontainer \c sub ? */
- bool contains(const interval_base_set& sub)const
- {
- return itl::within(sub, *that());
+ /** Is <tt>*this</tt> container within <tt>super</tt>? */
+ template<class CoType>
+ bool within(const CoType& super)const
+ {
+ return itl::within(*that(), super);
     }
 
- /** Does <tt>*this</tt> container contain <tt>sub</tt>? */
- template
- <
- template<class DomT, ITL_COMPARE Comp,
- ITL_INTERVAL2(ITL_COMPARE) Interv, ITL_ALLOC Allc>
- class IntervalSet
- >
- bool contains(const IntervalSet<DomainT,Compare,Interval,Alloc>& sub)const
- {
- return itl::within(sub,*that());
- }
 
- /** Is <tt>*this</tt> container contained in <tt>super</tt>? */
- template
- <
- template<class DomT, ITL_COMPARE Comp,
- ITL_INTERVAL2(ITL_COMPARE) Interv, ITL_ALLOC Allc>
- class IntervalSet
- >
- bool contained_in(const IntervalSet<DomainT,Compare,Interval,Alloc>& super)const
- {
- return Interval_Set::within(*this, super);
- }
 
     //==========================================================================
     //= Size

Modified: sandbox/itl/boost/itl/interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_set.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -14,6 +14,7 @@
 #include <boost/itl/type_traits/is_interval_joiner.hpp>
 #include <boost/itl/interval_base_set.hpp>
 #include <boost/itl/functions/associative_interval_container.hpp>
+ //JODO /interval_set_or_map.hpp ?
 #include <boost/itl/functions.hpp>
 
 namespace boost{namespace itl

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 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -255,7 +255,7 @@
 };
 
 template<class GuideT, class CompanionT>
-struct is_interval_map_right_intra_combinable
+struct is_interval_map_right_intra_combinable //JODO equivalent to is_fragment_type_of
 {
     typedef is_interval_map_right_intra_combinable<GuideT, CompanionT> type;
     BOOST_STATIC_CONSTANT(bool, value =
@@ -272,7 +272,7 @@
 };
 
 template<class GuideT, class CompanionT>
-struct is_interval_map_right_cross_combinable
+struct is_interval_map_right_cross_combinable //JODO == key_type_of<Comp, Guide>
 {
     typedef is_interval_map_right_cross_combinable<GuideT, CompanionT> type;
     BOOST_STATIC_CONSTANT(bool, value =

Added: sandbox/itl/boost/itl/type_traits/is_fragment_type_of.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/itl/type_traits/is_fragment_type_of.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -0,0 +1,39 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ITL_TYPE_TRAITS_IS_FRAGMENT_TYPE_OF_HPP_JOFA_100909
+#define BOOST_ITL_TYPE_TRAITS_IS_FRAGMENT_TYPE_OF_HPP_JOFA_100909
+
+#include <boost/itl/type_traits/is_combinable.hpp>
+
+namespace boost{ namespace itl
+{
+
+
+template<class CompanionT, class GuideT>
+struct is_interval_map_fragment_type_of //JODO equivalent to is_interval_map_right_intra_combinable
+{ //JODO generalize
+ typedef is_interval_map_fragment_type_of<CompanionT, GuideT> type;
+ BOOST_STATIC_CONSTANT(bool, value =
+ (mpl::and_
+ <
+ is_interval_map<GuideT>
+ , mpl::or_
+ <
+ is_interval_map_derivative<GuideT, CompanionT>
+ , is_concept_compatible<is_interval_map, GuideT, CompanionT>
+ >
+ >::value)
+ );
+};
+
+
+}} // namespace boost itl
+
+#endif
+
+

Modified: sandbox/itl/boost/itl/type_traits/is_key_container_of.hpp
==============================================================================
--- sandbox/itl/boost/itl/type_traits/is_key_container_of.hpp (original)
+++ sandbox/itl/boost/itl/type_traits/is_key_container_of.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -1,5 +1,5 @@
 /*-----------------------------------------------------------------------------+
-Copyright (c) 2008-2009: Joachim Faulhaber
+Copyright (c) 2010-2010: Joachim Faulhaber
 +------------------------------------------------------------------------------+
    Distributed under the Boost Software License, Version 1.0.
       (See accompanying file LICENCE.txt or copy at
@@ -15,7 +15,7 @@
 {
 
     template<class KeyT, class ObjectT>
- struct is_strict_key_container_of
+ struct is_strict_key_container_of // set is_strict_key_container_of map
     {
         typedef is_strict_key_container_of<KeyT, ObjectT> type;
         BOOST_STATIC_CONSTANT(bool, value =
@@ -25,7 +25,7 @@
     };
 
     template<class KeyT, class ObjectT>
- struct is_key_container_of
+ struct is_key_container_of // set is_key_container_of (set or map)
     {
         typedef is_key_container_of<KeyT, ObjectT> type;
         BOOST_STATIC_CONSTANT(bool, value =

Modified: sandbox/itl/libs/itl/test/Jamfile.v2
==============================================================================
--- sandbox/itl/libs/itl/test/Jamfile.v2 (original)
+++ sandbox/itl/libs/itl/test/Jamfile.v2 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -49,4 +49,6 @@
       # Concept Map
       [ run fastest_partial_interval_quantifier_/fastest_partial_interval_quantifier.cpp ]
       [ run fastest_total_interval_quantifier_/fastest_total_interval_quantifier.cpp ]
+ [ run fastest_partial_icl_quantifier_/fastest_partial_icl_quantifier.cpp ]
+ [ run fastest_total_icl_quantifier_/fastest_total_icl_quantifier.cpp ]
     ;

Added: sandbox/itl/libs/itl/test/test_calls.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_calls.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -0,0 +1,49 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2010-2010: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+
+/*-----------------------------------------------------------------------------+
+Function templates to call functions in object oriented or namespace glabal
+versions.
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ITL_TEST_CALLS_H_JOFA_100908
+#define BOOST_ITL_TEST_CALLS_H_JOFA_100908
+
+#include <boost/itl/detail/notate.hpp>
+#include <boost/itl/detail/design_config.hpp>
+
+namespace boost{namespace itl
+{
+
+namespace call{
+
+template<class Type, class CoType>
+bool contains(const Type& object, const CoType& co_object)
+{
+#ifdef ITL_PURE_CONCEPTUAL
+ return object.contains(co_object);
+#else
+ return itl::contains(object, co_object);
+#endif
+}
+
+template<class Type, class CoType>
+bool within(const Type& object, const CoType& co_object)
+{
+#ifdef ITL_PURE_CONCEPTUAL
+ return object.within(co_object);
+#else
+ return itl::within(object, co_object);
+#endif
+}
+
+} // namespace call
+
+}} // namespace itl boost
+
+#endif // BOOST_ITL_TEST_CALLS_H_JOFA_100908
+

Modified: sandbox/itl/libs/itl/test/test_interval_map_mixed.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map_mixed.hpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_map_mixed.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -25,8 +25,8 @@
     SplitIntervalMapT split_map(make_pair(v0,u1));
     IntervalMapT join_map(split_map);
 
- BOOST_CHECK_EQUAL( split_map.lower(), join_map.lower() );
- BOOST_CHECK_EQUAL( split_map.upper(), join_map.upper() );
+ BOOST_CHECK_EQUAL( hull(split_map).lower(), hull(join_map).lower() );
+ BOOST_CHECK_EQUAL( hull(split_map).upper(), hull(join_map).upper() );
 }
 
 template <class T, class U>
@@ -94,8 +94,8 @@
     join_map = split_map; //=t T& T::operator=(const P&) ...
 
 
- BOOST_CHECK_EQUAL( split_map.lower(), join_map.lower() );
- BOOST_CHECK_EQUAL( split_map.upper(), join_map.upper() );
+ BOOST_CHECK_EQUAL( hull(split_map).lower(), hull(join_map).lower() );
+ BOOST_CHECK_EQUAL( hull(split_map).upper(), hull(join_map).upper() );
 
     SplitIntervalMapT split_self = SplitIntervalMapT().add(v0_u1);
     IntervalMapT join_self = IntervalMapT().add(v1_u1);
@@ -264,12 +264,12 @@
     // ->2 ->1 ->1 ->2
     split_interval_map<T,U,Trt> split_sub_map1 = split_map;
     split_sub_map1.erase(MK_v(2));
- BOOST_CHECK_EQUAL( contains(split_sub_map1, MK_v(2)), false );
+ BOOST_CHECK_EQUAL( call::contains(split_sub_map1, MK_v(2)), false );
 
     interval_map<T,U,Trt> join_sub_map2;
     join_sub_map2 = split_map;
     join_sub_map2.erase(MK_v(1));
- BOOST_CHECK_EQUAL( contains(join_sub_map2, MK_v(1)), false );
+ BOOST_CHECK_EQUAL( call::contains(join_sub_map2, MK_v(1)), false );
 
     split_interval_set<T> split_sub_set1;
     separate_interval_set<T> sep_sub_set1;
@@ -359,35 +359,35 @@
     BOOST_CHECK_EQUAL( join_set.iterative_size(), 2 );
 
     // Key types
- BOOST_CHECK_EQUAL( contains(split_map, MK_v(0)), true );
- BOOST_CHECK_EQUAL( contains(split_map, MK_v(5)), true );
- BOOST_CHECK_EQUAL( contains(split_map, MK_v(9)), true );
-
- BOOST_CHECK_EQUAL( contains(split_map, I_D(2,3)), true );
- BOOST_CHECK_EQUAL( contains(split_map, I_D(0,6)), true );
- BOOST_CHECK_EQUAL( contains(split_map, I_D(0,7)), false );
- BOOST_CHECK_EQUAL( contains(join_map, I_D(2,3)), true );
- BOOST_CHECK_EQUAL( contains(join_map, I_D(0,6)), true );
- BOOST_CHECK_EQUAL( contains(join_map, I_D(0,7)), false );
+ BOOST_CHECK_EQUAL( call::contains(split_map, MK_v(0)), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, MK_v(5)), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, MK_v(9)), true );
+
+ BOOST_CHECK_EQUAL( call::contains(split_map, I_D(2,3)), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, I_D(0,6)), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, I_D(0,7)), false );
+ BOOST_CHECK_EQUAL( call::contains(join_map, I_D(2,3)), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, I_D(0,6)), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, I_D(0,7)), false );
 
     // Map types
- BOOST_CHECK_EQUAL( contains(join_map, K_v(1,2)), true );
- BOOST_CHECK_EQUAL( contains(join_map, K_v(5,1)), true );
- BOOST_CHECK_EQUAL( contains(join_map, K_v(9,2)), true );
-
- BOOST_CHECK_EQUAL( contains(split_map, IDv(2,6,1)), true );
- BOOST_CHECK_EQUAL( contains(split_map, IDv(1,6,1)), false );
- BOOST_CHECK_EQUAL( contains(split_map, IIv(8,9,2)), true );
- BOOST_CHECK_EQUAL( contains(split_map, IIv(8,9,3)), false );
- BOOST_CHECK_EQUAL( contains(join_map, IDv(2,6,1)), true );
- BOOST_CHECK_EQUAL( contains(join_map, IDv(1,6,1)), false );
- BOOST_CHECK_EQUAL( contains(join_map, IIv(8,9,2)), true );
- BOOST_CHECK_EQUAL( contains(join_map, IIv(8,9,3)), false );
-
- BOOST_CHECK_EQUAL( contains(split_map, join_map), true );
- BOOST_CHECK_EQUAL( contains(join_map, split_map), true );
- BOOST_CHECK_EQUAL( split_map.contained_in(join_map), true );
- BOOST_CHECK_EQUAL( join_map.contained_in(split_map), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, K_v(1,2)), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, K_v(5,1)), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, K_v(9,2)), true );
+
+ BOOST_CHECK_EQUAL( call::contains(split_map, IDv(2,6,1)), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, IDv(1,6,1)), false );
+ BOOST_CHECK_EQUAL( call::contains(split_map, IIv(8,9,2)), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, IIv(8,9,3)), false );
+ BOOST_CHECK_EQUAL( call::contains(join_map, IDv(2,6,1)), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, IDv(1,6,1)), false );
+ BOOST_CHECK_EQUAL( call::contains(join_map, IIv(8,9,2)), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, IIv(8,9,3)), false );
+
+ BOOST_CHECK_EQUAL( call::contains(split_map, join_map), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, split_map), true );
+ BOOST_CHECK_EQUAL( call::within(split_map, join_map), true );
+ BOOST_CHECK_EQUAL( call::within(join_map, split_map), true );
 
     //--------------------------------------------------------------------------
     // inclusions
@@ -398,12 +398,12 @@
     // ->2 ->1 ->1 ->2
     split_interval_map<T,U,Trt> split_sub_map1 = split_map;
     split_sub_map1.erase(MK_v(2));
- BOOST_CHECK_EQUAL( contains(split_sub_map1, MK_v(2)), false );
+ BOOST_CHECK_EQUAL( call::contains(split_sub_map1, MK_v(2)), false );
 
     interval_map<T,U,Trt> join_sub_map2;
     join_sub_map2 = split_map;
     join_sub_map2.erase(MK_v(1));
- BOOST_CHECK_EQUAL( contains(join_sub_map2, MK_v(1)), false );
+ BOOST_CHECK_EQUAL( call::contains(join_sub_map2, MK_v(1)), false );
 
     split_interval_set<T> split_sub_set1;
     separate_interval_set<T> sep_sub_set1;
@@ -413,22 +413,22 @@
     split_sub_map1.domain(sep_sub_set1);
     split_sub_map1.domain(join_sub_set1);
 
- BOOST_CHECK_EQUAL( split_sub_map1.contained_in(split_map), true );
- BOOST_CHECK_EQUAL( join_sub_map2.contained_in(split_map), true );
- BOOST_CHECK_EQUAL( split_sub_map1.contained_in(join_map ), true );
- BOOST_CHECK_EQUAL( join_sub_map2.contained_in(join_map ), true );
-
- BOOST_CHECK_EQUAL( contains(split_map, split_sub_map1), true );
- BOOST_CHECK_EQUAL( contains(split_map, join_sub_map2), true );
- BOOST_CHECK_EQUAL( contains(join_map, split_sub_map1), true );
- BOOST_CHECK_EQUAL( contains(join_map, join_sub_map2), true );
-
- BOOST_CHECK_EQUAL( contains(split_map, split_sub_set1), true );
- BOOST_CHECK_EQUAL( contains(split_map, sep_sub_set1), true );
- BOOST_CHECK_EQUAL( contains(split_map, join_sub_set1), true );
- BOOST_CHECK_EQUAL( contains(join_map, split_sub_set1), true );
- BOOST_CHECK_EQUAL( contains(join_map, sep_sub_set1), true );
- BOOST_CHECK_EQUAL( contains(join_map, join_sub_set1), true );
+ BOOST_CHECK_EQUAL( call::within(split_sub_map1, split_map), true );
+ BOOST_CHECK_EQUAL( call::within(join_sub_map2, split_map), true );
+ BOOST_CHECK_EQUAL( call::within(split_sub_map1, join_map ), true );
+ BOOST_CHECK_EQUAL( call::within(join_sub_map2, join_map ), true );
+
+ BOOST_CHECK_EQUAL( call::contains(split_map, split_sub_map1), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, join_sub_map2), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, split_sub_map1), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, join_sub_map2), true );
+
+ BOOST_CHECK_EQUAL( call::contains(split_map, split_sub_set1), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, sep_sub_set1), true );
+ BOOST_CHECK_EQUAL( call::contains(split_map, join_sub_set1), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, split_sub_set1), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, sep_sub_set1), true );
+ BOOST_CHECK_EQUAL( call::contains(join_map, join_sub_set1), true );
 
     split_interval_map<T,U,Trt> split_unrel_map11 = split_sub_map1;
     split_unrel_map11.set(CIv(7,9,1));
@@ -438,20 +438,20 @@
     join_unrel_map21.set(K_v(0,1));
     BOOST_CHECK_EQUAL( join_unrel_map21(MK_v(0)), MK_u(1) );
 
- BOOST_CHECK_EQUAL( contains(split_unrel_map11, split_map), false );
- BOOST_CHECK_EQUAL( contains(join_unrel_map21, split_map), false );
- BOOST_CHECK_EQUAL( contains(split_unrel_map11, join_map), false );
- BOOST_CHECK_EQUAL( contains(join_unrel_map21, join_map), false );
-
- BOOST_CHECK_EQUAL( split_unrel_map11.contained_in(split_map), false );
- BOOST_CHECK_EQUAL( join_unrel_map21.contained_in(split_map), false );
- BOOST_CHECK_EQUAL( split_unrel_map11.contained_in( join_map), false );
- BOOST_CHECK_EQUAL( join_unrel_map21.contained_in( join_map), false );
-
- BOOST_CHECK_EQUAL( contains(split_map, split_unrel_map11), false );
- BOOST_CHECK_EQUAL( contains(split_map, join_unrel_map21), false );
- BOOST_CHECK_EQUAL( contains(join_map, split_unrel_map11), false );
- BOOST_CHECK_EQUAL( contains(join_map, join_unrel_map21), false );
+ BOOST_CHECK_EQUAL( call::contains(split_unrel_map11, split_map), false );
+ BOOST_CHECK_EQUAL( call::contains(join_unrel_map21, split_map), false );
+ BOOST_CHECK_EQUAL( call::contains(split_unrel_map11, join_map), false );
+ BOOST_CHECK_EQUAL( call::contains(join_unrel_map21, join_map), false );
+
+ BOOST_CHECK_EQUAL( call::within(split_unrel_map11, split_map), false );
+ BOOST_CHECK_EQUAL( call::within(join_unrel_map21, split_map), false );
+ BOOST_CHECK_EQUAL( call::within(split_unrel_map11, join_map), false );
+ BOOST_CHECK_EQUAL( call::within(join_unrel_map21, join_map), false );
+
+ BOOST_CHECK_EQUAL( call::contains(split_map, split_unrel_map11), false );
+ BOOST_CHECK_EQUAL( call::contains(split_map, join_unrel_map21), false );
+ BOOST_CHECK_EQUAL( call::contains(join_map, split_unrel_map11), false );
+ BOOST_CHECK_EQUAL( call::contains(join_map, join_unrel_map21), false );
 
 }
 

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 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -115,8 +115,8 @@
     BOOST_CHECK_EQUAL(single_I0_0I_u1_from_element, single_I0_0I_u1_from_interval);
     BOOST_CHECK_EQUAL(single_I0_0I_u1_from_element, single_I0_0I_u1);
     BOOST_CHECK_EQUAL(hull(single_I0_0I_u1), I0_0I);
- BOOST_CHECK_EQUAL(single_I0_0I_u1.lower(), I0_0I.lower());
- BOOST_CHECK_EQUAL(single_I0_0I_u1.upper(), I0_0I.upper());
+ BOOST_CHECK_EQUAL(hull(single_I0_0I_u1).lower(), I0_0I.lower());
+ BOOST_CHECK_EQUAL(hull(single_I0_0I_u1).upper(), I0_0I.upper());
 
     IntervalMapT single_I1_1I_u1_from_element(v1_u1);
     IntervalMapT single_I1_1I_u1_from_interval(I1_1I_u1);
@@ -130,26 +130,26 @@
 
     BOOST_CHECK_EQUAL(single_I0_1I_u1_from_interval, single_I0_1I_u1);
     BOOST_CHECK_EQUAL(hull(single_I0_1I_u1), I0_1I);
- BOOST_CHECK_EQUAL(single_I0_1I_u1.lower(), I0_1I.lower());
- BOOST_CHECK_EQUAL(single_I0_1I_u1.upper(), I0_1I.upper());
+ BOOST_CHECK_EQUAL(hull(single_I0_1I_u1).lower(), I0_1I.lower());
+ BOOST_CHECK_EQUAL(hull(single_I0_1I_u1).upper(), I0_1I.upper());
 
     //contains predicate
- BOOST_CHECK_EQUAL(contains(single_I0_0I_u1, v0), true);
- BOOST_CHECK_EQUAL(contains(single_I0_0I_u1, v0_u1), true);
- BOOST_CHECK_EQUAL(contains(single_I0_0I_u1, I0_0I_u1), true);
-
- BOOST_CHECK_EQUAL(contains(single_I1_1I_u1, v1), true);
- BOOST_CHECK_EQUAL(contains(single_I1_1I_u1, v1_u1), true);
- BOOST_CHECK_EQUAL(contains(single_I1_1I_u1, I1_1I_u1), true);
-
- BOOST_CHECK_EQUAL(contains(single_I0_1I_u1, v0), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I_u1, I0_1I_u1), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I_u1, v1), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I_u1, I1_1I_u1), true);
-
- BOOST_CHECK_EQUAL(contains(single_I0_1I_u1, single_I0_0I_u1), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I_u1, single_I1_1I_u1), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I_u1, single_I0_1I_u1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_0I_u1, v0), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_0I_u1, v0_u1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_0I_u1, I0_0I_u1), true);
+
+ BOOST_CHECK_EQUAL(call::contains(single_I1_1I_u1, v1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I1_1I_u1, v1_u1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I1_1I_u1, I1_1I_u1), true);
+
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I_u1, v0), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I_u1, I0_1I_u1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I_u1, v1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I_u1, I1_1I_u1), true);
+
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I_u1, single_I0_0I_u1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I_u1, single_I1_1I_u1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I_u1, single_I0_1I_u1), true);
 
     BOOST_CHECK_EQUAL(single_I0_0I_u1.cardinality(), unon<size_T>::value());
     BOOST_CHECK_EQUAL(single_I0_0I_u1.size(), unon<size_T>::value());
@@ -204,8 +204,8 @@
     BOOST_CHECK_EQUAL( _I4_4I_u2.size(), unon<typename IntervalMapT::size_type>::value() );
     BOOST_CHECK_EQUAL( _I4_4I_u2.interval_count(), 1 );
     BOOST_CHECK_EQUAL( _I4_4I_u2.iterative_size(), 1 );
- BOOST_CHECK_EQUAL( _I4_4I_u2.lower(), v4 );
- BOOST_CHECK_EQUAL( _I4_4I_u2.upper(), v4 );
+ BOOST_CHECK_EQUAL( hull(_I4_4I_u2).lower(), v4 );
+ BOOST_CHECK_EQUAL( hull(_I4_4I_u2).upper(), v4 );
 
     IntervalMapT _I4_4I_u2_copy(_I4_4I_u2);
     IntervalMapT _I4_4I_u2_assigned;
@@ -257,8 +257,8 @@
     IntervalMapT map_B = IntervalMapT().insert(v9_u1).insert(I5_6I_u1).insert(v0_u1);
     BOOST_CHECK_EQUAL( map_A, map_B );
     BOOST_CHECK_EQUAL( hull(map_A), I0_9I );
- BOOST_CHECK_EQUAL( map_A.lower(), I0_9I.lower() );
- BOOST_CHECK_EQUAL( map_A.upper(), I0_9I.upper() );
+ BOOST_CHECK_EQUAL( hull(map_A).lower(), I0_9I.lower() );
+ BOOST_CHECK_EQUAL( hull(map_A).upper(), I0_9I.upper() );
 
     IntervalMapT map_A1 = map_A, map_B1 = map_B,
                  map_A2 = map_A, map_B2 = map_B;
@@ -432,21 +432,21 @@
     typedef typename IntervalMapT::interval_type IntervalT;
     typedef typename IntervalMapT::set_type IntervalSetT;
     IntervalMapT itv_map; itv_map.add(K_v(3,1));
- BOOST_CHECK_EQUAL( contains(itv_map, MK_v(3)), true );
- BOOST_CHECK_EQUAL( contains(itv_map, K_v(3,1)), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, MK_v(3)), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, K_v(3,1)), true );
 
- BOOST_CHECK_EQUAL( IntervalMapT().add(K_v(3,1)).contains(K_v(3,1)), true );
- BOOST_CHECK_EQUAL( IntervalMapT().add(K_v(3,1)).contains(MK_v(3)), true );
- BOOST_CHECK_EQUAL( IntervalMapT().insert(K_v(3,1)).contains(K_v(3,1)), true );
+ BOOST_CHECK_EQUAL( call::contains(IntervalMapT().add(K_v(3,1)), K_v(3,1)), true );
+ BOOST_CHECK_EQUAL( call::contains(IntervalMapT().add(K_v(3,1)), MK_v(3)), true );
+ BOOST_CHECK_EQUAL( call::contains(IntervalMapT().insert(K_v(3,1)), K_v(3,1)), true );
     itv_map.clear();
- BOOST_CHECK_EQUAL( (itv_map += IIv(3,7,1)).contains(IIv(3,7,1)), true );
- BOOST_CHECK_EQUAL( contains(itv_map, IIv(3,7,2)), false );
- BOOST_CHECK_EQUAL( contains(itv_map, I_I(3,7)), true );
- BOOST_CHECK_EQUAL( contains(itv_map, I_I(4,6)), true );
- BOOST_CHECK_EQUAL( (itv_map += CIv(7,9,1)).contains(IIv(3,9,1)), true );
- BOOST_CHECK_EQUAL( contains(itv_map, I_I(4,8)), true );
- BOOST_CHECK_EQUAL( (itv_map += IIv(11,12,1)).contains(IIv(3,12,1)), false );
- BOOST_CHECK_EQUAL( contains(itv_map, I_I(4,11)), false );
+ BOOST_CHECK_EQUAL( call::contains((itv_map += IIv(3,7,1)), IIv(3,7,1)), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, IIv(3,7,2)), false );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, I_I(3,7)), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, I_I(4,6)), true );
+ BOOST_CHECK_EQUAL( call::contains((itv_map += CIv(7,9,1)),IIv(3,9,1)), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, I_I(4,8)), true );
+ BOOST_CHECK_EQUAL( call::contains((itv_map += IIv(11,12,1)), IIv(3,12,1)), false );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, I_I(4,11)), false );
 
     IntervalMapT itv_map0 = itv_map;
 
@@ -454,10 +454,10 @@
     IntervalMapT itv_map2(IIv(5,8,1));
     itv_map2.add(K_v(9,1)).add(K_v(11,1));
     itv_map += itv_map2;
- BOOST_CHECK_EQUAL( contains(itv_map, itv_map2), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, itv_map2), true );
     IntervalSetT itv_set2;
     itv_map2.domain(itv_set2);
- BOOST_CHECK_EQUAL( contains(itv_map, itv_set2), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, itv_set2), true );
 }
 
 template <template<class T, class U,
@@ -477,27 +477,27 @@
     IntervalMapT itv_map;
 
     itv_map.add(IDv(1,3,1));
- BOOST_CHECK_EQUAL( contains(itv_map, MK_v(0)), false );
- BOOST_CHECK_EQUAL( contains(itv_map, MK_v(2)), true );
- BOOST_CHECK_EQUAL( contains(itv_map, MK_v(3)), false );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, MK_v(0)), false );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, MK_v(2)), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, MK_v(3)), false );
 
     itv_map.add(IDv(3,6,2));
- BOOST_CHECK_EQUAL( contains(itv_map, I_I(0,0)), false );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, I_I(0,0)), false );
     contains(itv_map, I_I(2,4));
- BOOST_CHECK_EQUAL( contains(itv_map, I_I(2,4)), true );
- BOOST_CHECK_EQUAL( contains(itv_map, I_I(6,6)), false );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, I_I(2,4)), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, I_I(6,6)), false );
 
     itv_map.add(IDv(8,9,2));
 
     IntervalSetT itv_set;
     itv_set.add(C_I(1,2)).add(C_D(2,6)).add(I_I(8,8));
- BOOST_CHECK_EQUAL( contains(itv_map, itv_set), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, itv_set), true );
     itv_set.add(I_I(1,4));
- BOOST_CHECK_EQUAL( contains(itv_map, itv_set), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, itv_set), true );
     itv_set.add(I_I(1,4));
- BOOST_CHECK_EQUAL( contains(itv_map, itv_set), true );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, itv_set), true );
     itv_set.add(I_I(7,7));
- BOOST_CHECK_EQUAL( contains(itv_map, itv_set), false );
+ BOOST_CHECK_EQUAL( call::contains(itv_map, itv_set), false );
 
 }
 
@@ -1138,9 +1138,9 @@
     IntervalMapT map_a;
     map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
 
- BOOST_CHECK_EQUAL( map_a.set(CDv(2,10,4)).contains(CDv(2,10,4)), true );
- BOOST_CHECK_EQUAL( map_a.set(K_v(4,5)).contains(K_v(4,5)), true );
- BOOST_CHECK_EQUAL( map_a.set(K_v(4,5)).set(CDv(3,5,6)).contains(CDv(3,5,6)), true );
+ BOOST_CHECK_EQUAL( call::contains(map_a.set(CDv(2,10,4)), CDv(2,10,4)), true );
+ BOOST_CHECK_EQUAL( call::contains(map_a.set(K_v(4,5)), K_v(4,5)), true );
+ BOOST_CHECK_EQUAL( call::contains(map_a.set(K_v(4,5)).set(CDv(3,5,6)), CDv(3,5,6)), true );
 }
 
 

Modified: sandbox/itl/libs/itl/test/test_interval_set_mixed.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_set_mixed.hpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_set_mixed.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -245,15 +245,15 @@
 
     split_interval_set<T> split_set;
     split_set.add(I_D(0,4)).add(I_D(4,8));
- BOOST_CHECK_EQUAL( contains(split_set, MK_v(4)), true );
- BOOST_CHECK_EQUAL( contains(split_set, C_D(2,5)), true );
+ BOOST_CHECK_EQUAL( call::contains(split_set, MK_v(4)), true );
+ BOOST_CHECK_EQUAL( call::contains(split_set, C_D(2,5)), true );
 
     interval_set<T> join_set_gap4(split_set.erase(MK_v(4)));
- BOOST_CHECK_EQUAL( contains(join_set_gap4, MK_v(4)), false );
- BOOST_CHECK_EQUAL( contains(join_set_gap4, C_D(2,5)), false );
+ BOOST_CHECK_EQUAL( call::contains(join_set_gap4, MK_v(4)), false );
+ BOOST_CHECK_EQUAL( call::contains(join_set_gap4, C_D(2,5)), false );
 
- BOOST_CHECK_EQUAL( contains(split_set, split_set), true );
- BOOST_CHECK_EQUAL( contains(split_set, join_set_gap4), true );
+ BOOST_CHECK_EQUAL( call::contains(split_set, split_set), true );
+ BOOST_CHECK_EQUAL( call::contains(split_set, join_set_gap4), true );
     
 }
 

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 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -121,18 +121,19 @@
     BOOST_CHECK_EQUAL(hull(single_I0_1I).upper(), I0_1I.upper());
 
     //contains predicate
- BOOST_CHECK_EQUAL(contains(single_I0_0I, v0), true);
- BOOST_CHECK_EQUAL(contains(single_I0_0I, I0_0I), true);
- BOOST_CHECK_EQUAL(contains(single_I1_1I, v1), true);
- BOOST_CHECK_EQUAL(contains(single_I1_1I, I1_1I), true);
-
- BOOST_CHECK_EQUAL(contains(single_I0_1I, v0), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I, I0_1I), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I, v1), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I, I1_1I), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I, single_I0_0I), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I, single_I1_1I), true);
- BOOST_CHECK_EQUAL(contains(single_I0_1I, single_I0_1I), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_0I, v0), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_0I, I0_0I), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I1_1I, v1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I1_1I, I1_1I), true);
+
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I, v0), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I, I0_1I), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I, v1), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I, I1_1I), true);
+
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I, single_I0_0I), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I, single_I1_1I), true);
+ BOOST_CHECK_EQUAL(call::contains(single_I0_1I, single_I0_1I), true);
 
     BOOST_CHECK_EQUAL(single_I0_0I.cardinality(), unon<size_T>::value());
     BOOST_CHECK_EQUAL(single_I0_0I.size(), unon<size_T>::value());
@@ -423,7 +424,7 @@
     T v9 = make<T>(9);
     T v11 = make<T>(11);
     IntervalSet<T> is(v1);
- BOOST_CHECK_EQUAL( contains(is, v1), true );
+ BOOST_CHECK_EQUAL( call::contains(is, v1), true );
 
     BOOST_CHECK_EQUAL( IntervalSet<T>().add(make<T>(2)).contains(make<T>(2)), true );
     BOOST_CHECK_EQUAL( IntervalSet<T>().insert(make<T>(2)).contains(make<T>(2)), true );
@@ -474,18 +475,18 @@
     BOOST_CHECK_EQUAL( is_disjoint(section, complement), true );
     BOOST_CHECK_EQUAL( all, all2 );
 
- BOOST_CHECK_EQUAL( contains(all, left), true );
- BOOST_CHECK_EQUAL( contains(all, right), true );
- BOOST_CHECK_EQUAL( contains(all, complement), true );
-
- BOOST_CHECK_EQUAL( contains(left, section), true );
- BOOST_CHECK_EQUAL( contains(right, section), true );
-
- BOOST_CHECK_EQUAL( left.contained_in(all), true );
- BOOST_CHECK_EQUAL( right.contained_in(all), true );
- BOOST_CHECK_EQUAL( complement.contained_in(all), true );
- BOOST_CHECK_EQUAL( section.contained_in(left), true );
- BOOST_CHECK_EQUAL( section.contained_in(right), true );
+ BOOST_CHECK_EQUAL( call::contains(all, left), true );
+ BOOST_CHECK_EQUAL( call::contains(all, right), true );
+ BOOST_CHECK_EQUAL( call::contains(all, complement), true );
+
+ BOOST_CHECK_EQUAL( call::contains(left, section), true );
+ BOOST_CHECK_EQUAL( call::contains(right, section), true );
+
+ BOOST_CHECK_EQUAL( within(left, all), true );
+ BOOST_CHECK_EQUAL( within(right, all), true );
+ BOOST_CHECK_EQUAL( within(complement, all), true );
+ BOOST_CHECK_EQUAL( within(section, left), true );
+ BOOST_CHECK_EQUAL( within(section, right), true );
 }
 
 

Modified: sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -56,8 +56,8 @@
     BOOST_CHECK_EQUAL( I4_4I.lower(), v4 );
     BOOST_CHECK_EQUAL( I4_4I.upper(), v4 );
 
- BOOST_CHECK_EQUAL( contains(I4_4I, v4), true );
- BOOST_CHECK_EQUAL( contains(I4_4I, I4_4I), true );
+ BOOST_CHECK_EQUAL( call::contains(I4_4I, v4), true );
+ BOOST_CHECK_EQUAL( call::contains(I4_4I, I4_4I), true );
     BOOST_CHECK_EQUAL( within(I4_4I, I4_4I), true );
     BOOST_CHECK_EQUAL( I4_4I, I4_4I );
     BOOST_CHECK_EQUAL( cardinality(I4_4I), unon<typename interval<T>::size_type>::value() );

Modified: sandbox/itl/libs/itl/test/test_value_maker.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_value_maker.hpp (original)
+++ sandbox/itl/libs/itl/test/test_value_maker.hpp 2010-09-09 12:32:20 EDT (Thu, 09 Sep 2010)
@@ -9,6 +9,7 @@
 #define BOOST_ITL_TEST_VALUE_MAKER_HPP_JOFA_080916
 
 #include <boost/itl/type_traits/neutron.hpp>
+#include "test_calls.hpp"
 
 namespace boost{ namespace itl
 {


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