Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56499 - in sandbox/itl: boost/itl libs/itl/doc libs/itl/example/boost_party_ libs/itl/example/interval_ libs/itl/example/interval_container_ libs/itl/example/man_power_ libs/itl/example/month_and_week_grid_ libs/itl/example/overlap_counter_ libs/itl/example/partys_height_average_ libs/itl/example/partys_tallest_guests_ libs/itl/example/user_groups_ libs/itl/test libs/itl/test/test_casual_ libs/itl/test/test_itl_interval_
From: afojgo_at_[hidden]
Date: 2009-10-01 05:04:20


Author: jofaber
Date: 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
New Revision: 56499
URL: http://svn.boost.org/trac/boost/changeset/56499

Log:
Portability: Modifications due to problems with CodeWarrior 9.4. reported by Jeff Flinn.
Removed 'using insert' statement in itl::map. Reimplemented insert instead.
Removed co_val argument in add_front in interval_map and split_interval_map.
Some minor modifications in examples and documentation.
 
Text files modified:
   sandbox/itl/boost/itl/interval.hpp | 16 +
   sandbox/itl/boost/itl/interval_base_map.hpp | 8
   sandbox/itl/boost/itl/interval_map.hpp | 8
   sandbox/itl/boost/itl/map.hpp | 16 +
   sandbox/itl/boost/itl/split_interval_map.hpp | 8
   sandbox/itl/libs/itl/doc/functions_intersection.qbk | 21 +
   sandbox/itl/libs/itl/doc/interface.qbk | 1
   sandbox/itl/libs/itl/doc/itl.qbk | 4
   sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp | 2
   sandbox/itl/libs/itl/example/interval_/interval.cpp | 2
   sandbox/itl/libs/itl/example/interval_container_/interval_container.cpp | 2
   sandbox/itl/libs/itl/example/man_power_/man_power.cpp | 2
   sandbox/itl/libs/itl/example/month_and_week_grid_/month_and_week_grid.cpp | 2
   sandbox/itl/libs/itl/example/overlap_counter_/overlap_counter.cpp | 22
   sandbox/itl/libs/itl/example/partys_height_average_/partys_height_average.cpp | 2
   sandbox/itl/libs/itl/example/partys_tallest_guests_/partys_tallest_guests.cpp | 2
   sandbox/itl/libs/itl/example/user_groups_/user_groups.cpp | 2
   sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp | 3
   sandbox/itl/libs/itl/test/test_interval_map_shared.hpp | 15 +
   sandbox/itl/libs/itl/test/test_itl_interval.hpp | 6
   sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp | 460 +++------------------------------------
   sandbox/itl/libs/itl/test/test_type_lists.hpp | 15
   22 files changed, 150 insertions(+), 469 deletions(-)

Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp (original)
+++ sandbox/itl/boost/itl/interval.hpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -1059,6 +1059,22 @@
     return left &= right;
 }
 
+/** Returns true if the intersection of \c left and \c right is not empty. */
+template <class DomainT, ITL_COMPARE Compare>
+inline bool intersects(const itl::interval<DomainT,Compare>& left,
+ const itl::interval<DomainT,Compare>& right)
+{
+ return left.intersects(right);
+}
+
+/** Returns true if \c left and \c right do not intersect. */
+template <class DomainT, ITL_COMPARE Compare>
+inline bool is_disjoint(const itl::interval<DomainT,Compare>& left,
+ const itl::interval<DomainT,Compare>& right)
+{
+ return left.is_disjoint(right);
+}
+
 //==============================================================================
 //= Representation
 //==============================================================================

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-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -769,7 +769,7 @@
         map_insert(iterator prior_, const interval_type& inter_val, const codomain_type& co_val)
     {
         iterator inserted_
- = this->_map.insert(prior_, value_type(inter_val, Combiner::neutron()));
+ = this->_map.base_insert(prior_, value_type(inter_val, Combiner::neutron()));
 
         if(inserted_->first == inter_val && inserted_->second == Combiner::neutron())
         {
@@ -789,12 +789,12 @@
 
         if(Traits::is_total)
         {
- iterator inserted_ = this->_map.insert(prior_, value_type(inter_val, Combiner::neutron()));
+ iterator inserted_ = this->_map.base_insert(prior_, value_type(inter_val, Combiner::neutron()));
             Combiner()(inserted_->second, co_val);
             return inserted_;
         }
         else
- return this->_map.insert(prior_, value_type(inter_val, co_val));
+ return this->_map.base_insert(prior_, value_type(inter_val, co_val));
     }
 
 protected:
@@ -1271,7 +1271,7 @@
         {
             const_cast<interval_type&>(first_->first).right_subtract(minuend);
             if(!right_resid.empty())
- this->_map.insert(first_, value_type(right_resid, first_->second));
+ this->_map.base_insert(first_, value_type(right_resid, first_->second));
         }
         else if(!right_resid.empty())
             const_cast<interval_type&>(first_->first).left_subtract(minuend);

Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -152,7 +152,7 @@
     template<class Combiner>
     void add_rear(const interval_type& inter_val, const CodomainT& co_val, iterator& it_);
 
- void add_front(const interval_type& inter_val, const CodomainT& co_val, iterator& first_);
+ void add_front(const interval_type& inter_val, iterator& first_);
 
     template<class Combiner>
     void add_segment(const interval_type& inter_val, const CodomainT& co_val, iterator& it_);
@@ -284,7 +284,7 @@
         iterator it_ = first_;
         interval_type rest_interval = inter_val;
 
- add_front (rest_interval, co_val, it_);
+ add_front (rest_interval, it_);
         add_main<Combiner>(rest_interval, co_val, it_, last_);
         add_rear<Combiner>(rest_interval, co_val, it_);
     }
@@ -319,7 +319,7 @@
                  --last_;
         interval_type rest_interval = inter_val;
 
- add_front (rest_interval, co_val, it_);
+ add_front (rest_interval, it_);
         add_main<Combiner>(rest_interval, co_val, it_, last_);
         add_rear<Combiner>(rest_interval, co_val, it_);
 
@@ -330,7 +330,7 @@
 
 template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
 inline void interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
- ::add_front(const interval_type& inter_val, const CodomainT& co_val, iterator& first_)
+ ::add_front(const interval_type& inter_val, iterator& first_)
 {
     // If the collision sequence has a left residual 'left_resid' it will
     // be split, to provide a standardized start of algorithms:

Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -170,7 +170,6 @@
     using base_type::key_comp;
     using base_type::value_comp;
 
- using base_type::insert;
     using base_type::erase;
     using base_type::find;
     using base_type::count;
@@ -272,6 +271,19 @@
         else
             return base_type::insert(value_pair);
     }
+
+ iterator insert(iterator prior, const value_type& value_pair)
+ {
+ if(Traits::absorbs_neutrons && value_pair.second == codomain_combine::neutron())
+ return prior;
+ else
+ return base_type::insert(prior, value_pair);
+ }
+
+ iterator base_insert(iterator prior, const value_type& value_pair)
+ {
+ return base_type::insert(prior, value_pair);
+ }
 
     /** With <tt>key_value_pair = (k,v)</tt> set value \c v for key \c k */
     map& set(const element_type& key_value_pair)
@@ -445,7 +457,7 @@
     if(Traits::absorbs_neutrons && val.second == Combiner::neutron())
         return prior_;
 
- iterator inserted_ = insert(prior_, value_type(val.first, Combiner::neutron()));
+ iterator inserted_ = base_insert(prior_, value_type(val.first, Combiner::neutron()));
     Combiner()(inserted_->second, val.second);
     if(Traits::absorbs_neutrons && inserted_->second == Combiner::neutron())
     {

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-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -137,7 +137,7 @@
     void add_segment(const interval_type& inter_val, const CodomainT& co_val,
                      iterator& it_);
 
- void add_front(const interval_type& inter_val, const CodomainT& co_val, iterator& it_);
+ void add_front(const interval_type& inter_val, iterator& it_);
 
     template<class Combiner>
     void add_rear(const interval_type& inter_val, const CodomainT& co_val, iterator& it_);
@@ -184,7 +184,7 @@
         iterator it_ = first_;
         interval_type rest_interval = inter_val;
 
- add_front (rest_interval, co_val, it_);
+ add_front (rest_interval, it_);
         add_main<Combiner>(rest_interval, co_val, it_, last_);
         add_rear<Combiner>(rest_interval, co_val, it_);
     }
@@ -218,7 +218,7 @@
                  --last_;
         interval_type rest_interval = inter_val;
 
- add_front (rest_interval, co_val, it_);
+ add_front (rest_interval, it_);
         add_main<Combiner>(rest_interval, co_val, it_, last_);
         add_rear<Combiner>(rest_interval, co_val, it_);
 
@@ -229,7 +229,7 @@
 
 template <typename DomainT, typename CodomainT, class Traits, ITL_COMPARE Compare, ITL_COMBINE Combine, ITL_SECTION Section, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
 inline void split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>
- ::add_front(const interval_type& inter_val, const CodomainT& co_val, iterator& first_)
+ ::add_front(const interval_type& inter_val, iterator& first_)
 {
     // If the collision sequence has a left residual 'left_resid' it will
     // be split, to provide a standardized start of algorithms:

Modified: sandbox/itl/libs/itl/doc/functions_intersection.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/functions_intersection.qbk (original)
+++ sandbox/itl/libs/itl/doc/functions_intersection.qbk 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -17,9 +17,10 @@
 [[`T& operator &=(T&, const P&)`] [__i] [__eiS][__eiS __bpM][__es] [__bm] ]
 [[`T operator & (T, const P&)`\n`T operator & (const P&, T)`]
                                                [__i] [__eiS][__eiS __bpM][__es] [__bm] ]
+[[`bool intersects(const T&, const P&)`] [__i] [__eiS][__eiS __bpM][__es] [__bm] ]
 ]
 
-Functions and operators that implement ['*intersection*] on *itl* objects
+Functions and operators that are related to ['*intersection*] on *itl* objects
 are given in the table above.
 
 
@@ -47,7 +48,6 @@
          ]]
 ]
 
-
 [endsect][/ Synopsis Intersection]
 
 
@@ -225,6 +225,23 @@
 
 [endsect][/ Inplace operator Intersection]
 
+[section Intersection tester]
+
+[table
+[[Tester] [Desctription]]
+[[`bool intersects(const T& left, const P& right)`][Tests, if `left` and `right` intersect.]]
+]
+
+``
+// bool intersects(const T&, const P&)
+T\P | e b s m T\P | e i b p S M
+----+-------- ----+------------
+ s | 1 1 S | 1 1 1
+ m | 1 1 1 1 M | 1 1 1 1 1 1
+``
+
+[endsect][/ Intersection tester]
+
 [endsect][/ Intersection]
 
 

Modified: sandbox/itl/libs/itl/doc/interface.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/interface.qbk (original)
+++ sandbox/itl/libs/itl/doc/interface.qbk 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -502,6 +502,7 @@
 [[`T& operator &=(T&, const P&)`] [__i] [__eiS][__eiS __bpM][__es] [__bm] [ ] [ ]]
 [[`T operator & (T, const P&)`\n`T operator & (const P&, T)`]
                                                [__i] [__eiS][__eiS __bpM][__es] [__bm] [ ] [ ]]
+[[`bool intersects(const T&, const P&)`] [__i] [__eiS][__eiS __bpM][__es] [__bm] [ ] [ ]]
                                                
 [[__biLSymmetricDifference__] [ ] [ ] [ ] [ ] [ ] [ ] [ ]]
 [[`T& T::flip(const P&)`] [ ] [__ei] [__bp] [__e] [__b] [ ] [ ]]

Modified: sandbox/itl/libs/itl/doc/itl.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/itl.qbk (original)
+++ sandbox/itl/libs/itl/doc/itl.qbk 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -128,8 +128,8 @@
                       [link itl_map_type *m*] [link interval_map_types *M*]]
 
 [def __biLConsCopyDest__ [link boost_itl.function_reference.construct__copy__destruct ['*Construct, copy, destruct*]]]
-[def __biLContainedness__ [link boost_itl.function_reference.containment ['*Containedness*]]]
-[def __biLcontainedness__ [link boost_itl.function_reference.containment ['*containedness*]]]
+[def __biLContainedness__ [link boost_itl.function_reference.containedness ['*Containedness*]]]
+[def __biLcontainedness__ [link boost_itl.function_reference.containedness ['*containedness*]]]
 [def __biLEquivsOrderings__ [link boost_itl.function_reference.equivalences_and_orderings ['*Equivalences and Orderings*]]]
 [def __biLSize__ [link boost_itl.function_reference.size ['*Size*]]]
 [def __biLRange__ [link boost_itl.function_reference.range ['*Range*]]]

Modified: sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp (original)
+++ sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -43,7 +43,7 @@
     The <em>accumulative behavior</em> accumulates associated values on every overlap of
     an insertion for the associated values.
 
- \include boost_party/boost_party.cpp
+ \include boost_party_/boost_party.cpp
 */
 //[example_boost_party
 #include <iostream>

Modified: sandbox/itl/libs/itl/example/interval_/interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/interval_/interval.cpp (original)
+++ sandbox/itl/libs/itl/example/interval_/interval.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -15,7 +15,7 @@
 
     This program gives a very short samlpe of different interval instances.
 
- \include example/interval/interval.cpp
+ \include example/interval_/interval.cpp
 */
 //[example_interval
 #include <iostream>

Modified: sandbox/itl/libs/itl/example/interval_container_/interval_container.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/interval_container_/interval_container.cpp (original)
+++ sandbox/itl/libs/itl/example/interval_container_/interval_container.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -16,7 +16,7 @@
     Simple interactive shells for the manipulation of interval containers can be found
     in the 'tests.sln' project.
 
- \include interval_container/interval_container.cpp
+ \include interval_container_/interval_container.cpp
 */
 //[example_interval_container
 #include <stdio.h>

Modified: sandbox/itl/libs/itl/example/man_power_/man_power.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/man_power_/man_power.cpp (original)
+++ sandbox/itl/libs/itl/example/man_power_/man_power.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -19,7 +19,7 @@
     times (man-power) of a company's employees accounting for weekends,
     holidays, sickness times and vacations.
 
- \include man_power/man_power.cpp
+ \include man_power_/man_power.cpp
 */
 //[example_man_power
 #include <stdio.h>

Modified: sandbox/itl/libs/itl/example/month_and_week_grid_/month_and_week_grid.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/month_and_week_grid_/month_and_week_grid.cpp (original)
+++ sandbox/itl/libs/itl/example/month_and_week_grid_/month_and_week_grid.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -24,7 +24,7 @@
     In this example we provide an intersection of two split_interval_sets
     representing a month and week time grid.
 
- \include month_and_week_grid/month_and_week_grid.cpp
+ \include month_and_week_grid_/month_and_week_grid.cpp
 */
 //[example_month_and_week_grid
 #include <stdio.h>

Modified: sandbox/itl/libs/itl/example/overlap_counter_/overlap_counter.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/overlap_counter_/overlap_counter.cpp (original)
+++ sandbox/itl/libs/itl/example/overlap_counter_/overlap_counter.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -21,7 +21,7 @@
     increases the content of all value pairs in the map by 1, if their interval
     part overlaps with interval<int>(2,6).
 
- \include overlap_counter/overlap_counter.cpp
+ \include overlap_counter_/overlap_counter.cpp
 */
 //[example_overlap_counter
 #include <stdio.h>
@@ -55,23 +55,23 @@
 void overlap_counter()
 {
     OverlapCounterT overlap_counter;
- interval<int> itv;
+ interval<int> inter_val;
 
- itv = interval<int>::rightopen(4,8);
- cout << "-- adding " << itv.as_string() << " -----------------------------------------" << endl;
- overlap_counter += make_pair(interval<int>::rightopen(4,8), 1);
+ inter_val = interval<int>::rightopen(4,8);
+ cout << "-- adding " << inter_val << " -----------------------------------------" << endl;
+ overlap_counter += make_pair(inter_val, 1);
     print_overlaps(overlap_counter);
     cout << "-----------------------------------------------------------" << endl;
 
- itv = interval<int>::rightopen(6,9);
- cout << "-- adding " << itv.as_string() << " -----------------------------------------" << endl;
- overlap_counter += make_pair(interval<int>::rightopen(6,9), 1);
+ inter_val = interval<int>::rightopen(6,9);
+ cout << "-- adding " << inter_val << " -----------------------------------------" << endl;
+ overlap_counter += make_pair(inter_val, 1);
     print_overlaps(overlap_counter);
     cout << "-----------------------------------------------------------" << endl;
 
- itv = interval<int>::rightopen(1,9);
- cout << "-- adding " << itv.as_string() << " -----------------------------------------" << endl;
- overlap_counter += make_pair(interval<int>::rightopen(1,9), 1);
+ inter_val = interval<int>::rightopen(1,9);
+ cout << "-- adding " << inter_val << " -----------------------------------------" << endl;
+ overlap_counter += make_pair(inter_val, 1);
     print_overlaps(overlap_counter);
     cout << "-----------------------------------------------------------" << endl;
     

Modified: sandbox/itl/libs/itl/example/partys_height_average_/partys_height_average.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/partys_height_average_/partys_height_average.cpp (original)
+++ sandbox/itl/libs/itl/example/partys_height_average_/partys_height_average.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -19,7 +19,7 @@
     Based on the operator += we can aggregate counted sums on addition
     of interval value pairs into an interval_map.
 
- \include partys_height_average/partys_height_average.cpp
+ \include partys_height_average_/partys_height_average.cpp
 */
 //[example_partys_height_average
 #include <iostream>

Modified: sandbox/itl/libs/itl/example/partys_tallest_guests_/partys_tallest_guests.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/partys_tallest_guests_/partys_tallest_guests.cpp (original)
+++ sandbox/itl/libs/itl/example/partys_tallest_guests_/partys_tallest_guests.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -23,7 +23,7 @@
     that occur due to entering and leaving of guests are preserved in
     the split_interval_map.
 
- \include partys_tallest_guests/partys_tallest_guests.cpp
+ \include partys_tallest_guests_/partys_tallest_guests.cpp
 */
 //[example_partys_tallest_guests
 #include <iostream>

Modified: sandbox/itl/libs/itl/example/user_groups_/user_groups.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/user_groups_/user_groups.cpp (original)
+++ sandbox/itl/libs/itl/example/user_groups_/user_groups.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -28,7 +28,7 @@
     that are members of both med_users and admin_users and the times
     of the joint memberships.
     
- \include user_groups/user_groups.cpp
+ \include user_groups_/user_groups.cpp
 */
 //[example_user_groups
 #include <stdio.h>

Modified: sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp (original)
+++ sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -49,7 +49,8 @@
     spliss.add(I_D(1,3)).add(I_D(3,4)).add(I_D(4,6)).add(I_D(6,8));
     spliss.contains(I_D(2,5));
     BOOST_CHECK_EQUAL(spliss.contains(I_D(2,7)), true);
-
+ BOOST_CHECK_EQUAL(intersects(spliss, I_D(2,7)), true);
+ BOOST_CHECK_EQUAL(intersects(spliss, MK_v(2)), true);
     
     ItlMapT map_a(make_pair(1,1));
     ItlSetT set_a(1);

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-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -520,8 +520,8 @@
     IntervalMapT left, left2, right, all, section, complement;
     left.add(I0_1I_u1).add(I3_5I_u1);
     (right += I3_5I_u1) += I7_8I_u1;
- is_disjoint(left, right);
     BOOST_CHECK_EQUAL( is_disjoint(left, right), false );
+ BOOST_CHECK_EQUAL( intersects(left, right), true );
 
     (all += left) += right;
     (section += left) &= right;
@@ -530,6 +530,7 @@
     //complement.erase(I3_5I);
     complement.erase(section);
     BOOST_CHECK_EQUAL( is_disjoint(section, complement), true );
+ BOOST_CHECK_EQUAL( intersects(section, complement), false );
 }
 
 
@@ -808,6 +809,8 @@
     map_B.add(I0_1D_1).add(I3_6D_1).add(I8_9D_1);
     BOOST_CHECK_EQUAL( is_disjoint(map_A, map_B), true );
     BOOST_CHECK_EQUAL( is_disjoint(map_B, map_A), true );
+ BOOST_CHECK_EQUAL( intersects(map_A, map_B), false );
+ BOOST_CHECK_EQUAL( intersects(map_B, map_A), false );
 
     map_A.domain(set_A);
     map_B.domain(set_B);
@@ -815,11 +818,17 @@
     BOOST_CHECK_EQUAL( is_disjoint(set_B, map_A), true );
     BOOST_CHECK_EQUAL( is_disjoint(set_A, map_B), true );
     BOOST_CHECK_EQUAL( is_disjoint(map_B, set_A), true );
+ BOOST_CHECK_EQUAL( intersects(map_A, set_B), false );
+ BOOST_CHECK_EQUAL( intersects(set_B, map_A), false );
+ BOOST_CHECK_EQUAL( intersects(set_A, map_B), false );
+ BOOST_CHECK_EQUAL( intersects(map_B, set_A), false );
 
     map_A += I5_7D_1;
 
     BOOST_CHECK_EQUAL( is_disjoint(map_A, map_B), false );
     BOOST_CHECK_EQUAL( is_disjoint(map_B, map_A), false );
+ BOOST_CHECK_EQUAL( intersects(map_A, map_B), true );
+ BOOST_CHECK_EQUAL( intersects(map_B, map_A), true );
 
     map_A.domain(set_A);
     map_B.domain(set_B);
@@ -827,6 +836,10 @@
     BOOST_CHECK_EQUAL( is_disjoint(set_B, map_A), false );
     BOOST_CHECK_EQUAL( is_disjoint(set_A, map_B), false );
     BOOST_CHECK_EQUAL( is_disjoint(map_B, set_A), false );
+ BOOST_CHECK_EQUAL( intersects(map_A, set_B), true );
+ BOOST_CHECK_EQUAL( intersects(set_B, map_A), true );
+ BOOST_CHECK_EQUAL( intersects(set_A, map_B), true );
+ BOOST_CHECK_EQUAL( intersects(map_B, set_A), true );
 }
 
 template <template<class T, class U,

Modified: sandbox/itl/libs/itl/test/test_itl_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval.hpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_interval.hpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -280,6 +280,9 @@
     interval<T> I0_3D = interval<T>::rightopen(v0,v3);
     section = I3_7D; section &= I0_3D;
     BOOST_CHECK_EQUAL( I0_3D.is_disjoint(I3_7D), true );
+ BOOST_CHECK_EQUAL( !I0_3D.intersects(I3_7D), true );
+ BOOST_CHECK_EQUAL( is_disjoint(I0_3D,I3_7D), true );
+ BOOST_CHECK_EQUAL( !intersects(I0_3D,I3_7D), true );
     BOOST_CHECK_EQUAL( section.empty(), true );
     BOOST_CHECK_EQUAL( section, interval<T>() );
 
@@ -307,6 +310,9 @@
     section = I3_7D; section &= I7_9I;
     BOOST_CHECK_EQUAL( I3_7D.exclusive_less(I7_9I), true );
     BOOST_CHECK_EQUAL( I3_7D.is_disjoint(I7_9I), true );
+ BOOST_CHECK_EQUAL( !I3_7D.intersects(I7_9I), true );
+ BOOST_CHECK_EQUAL( is_disjoint(I3_7D,I7_9I), true );
+ BOOST_CHECK_EQUAL( !intersects(I3_7D,I7_9I), true );
     BOOST_CHECK_EQUAL( section.empty(), true );
 }
 

Modified: sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -26,438 +26,50 @@
 #include "../test_itl_interval.hpp"
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_ctor_4_ordered_types, T, ordered_types)
-{ interval_ctor_4_ordered_types<T>(); }
+(test_itl_interval_ctor_4_ordered_types, T, ordered_types)
+{ interval_ctor_4_ordered_types<T>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_ctor_4_bicremental_types, T, bicremental_types)
-{ interval_ctor_4_bicremental_types<T>(); }
+(test_itl_interval_ctor_4_bicremental_types, T, bicremental_types)
+{ interval_ctor_4_bicremental_types<T>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_ctor_4_integral_types, T, integral_types)
-{ interval_ctor_4_integral_types<T>(); }
+(test_itl_interval_ctor_4_integral_types, T, integral_types)
+{ interval_ctor_4_integral_types<T>(); }
 
 BOOST_AUTO_TEST_CASE
-(fastest_itl_interval_ctor_specific)
-{ interval_ctor_specific(); }
+(test_itl_interval_ctor_specific)
+{ interval_ctor_specific(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_equal_4_integral_types, T, integral_types)
-{ interval_equal_4_integral_types<T>(); }
+(test_itl_interval_equal_4_integral_types, T, integral_types)
+{ interval_equal_4_integral_types<T>(); }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_less_4_integral_types, T, integral_types)
-{ interval_less_4_integral_types<T>(); }
-
-BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_equal_4_bicremental_continuous_types, T, bicremental_continuous_types)
-{ interval_equal_4_bicremental_continuous_types<T>(); }
-
-BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_touches_4_bicremental_types, T, bicremental_types)
-{ interval_touches_4_bicremental_types<T>(); }
-
-BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_touches_4_integral_types, T, integral_types)
-{ interval_touches_4_integral_types<T>(); }
-
-BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_inplace_intersect_4_bicremental_types, T, bicremental_types)
-{ interval_inplace_intersect_4_bicremental_types<T>(); }
-
-BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_infix_intersect_4_bicremental_types, T, bicremental_types)
-{ interval_infix_intersect_4_bicremental_types<T>(); }
-
-BOOST_AUTO_TEST_CASE_TEMPLATE
-(fastest_itl_interval_subtract_4_bicremental_types, T, bicremental_types)
-{ interval_subtract_4_bicremental_types<T>(); }
-
-/*
-// Most general, largest set of types
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_ctor_4_ordered_types, T, ordered_types)
-{
- // An empty interval is defined as the closed interval [1,0]
- BOOST_CHECK_EQUAL(interval<T>().empty(), true);
- BOOST_CHECK_EQUAL(interval<T>().cardinality(), itl::neutron<typename itl::size<T>::type>::value());
- BOOST_CHECK_EQUAL(interval<T>().size(), itl::neutron<typename itl::size<T>::type>::value());
- BOOST_CHECK_EQUAL(interval<T>().lower(), itl::unon<T>::value());
- BOOST_CHECK_EQUAL(interval<T>().upper(), itl::neutron<T>::value());
-
- BOOST_CHECK_EQUAL(interval<T>(), interval<T>());
- BOOST_CHECK_EQUAL(interval<T>(), interval<T>(itl::unon<T>::value(), itl::neutron<T>::value()));
- BOOST_CHECK_EQUAL(interval<T>(), interval<T>(itl::unon<T>::value(), itl::neutron<T>::value(), closed_bounded));
-
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_ctor_4_bicremental_types, T, bicremental_types)
-{
- BOOST_CHECK_EQUAL( T(), pred(succ(T())));
- BOOST_CHECK_EQUAL( itl::neutron<T>::value(), pred(succ(itl::neutron<T>::value())) );
- BOOST_CHECK_EQUAL( itl::unon<T>::value(), succ(itl::neutron<T>::value()) );
- BOOST_CHECK_EQUAL( interval<T>().length(), itl::neutron<typename difference<T>::type>::value() );
-
- T v4 = make<T>(4);
- itl::interval<T> I4_4I(v4);
- BOOST_CHECK_EQUAL( I4_4I.is(closed_bounded), true );
- BOOST_CHECK_EQUAL( I4_4I.is(left_open), false );
- BOOST_CHECK_EQUAL( I4_4I.is(right_open), false );
- BOOST_CHECK_EQUAL( I4_4I.is(open_bounded), false );
- BOOST_CHECK_EQUAL( I4_4I.is_left(closed_bounded), true );
- BOOST_CHECK_EQUAL( I4_4I.is_right(closed_bounded), true );
- BOOST_CHECK_EQUAL( I4_4I.is_left(open_bounded), false );
- BOOST_CHECK_EQUAL( I4_4I.is_right(open_bounded), false );
-
- BOOST_CHECK_EQUAL( I4_4I.lower(), v4 );
- BOOST_CHECK_EQUAL( I4_4I.upper(), v4 );
-
- BOOST_CHECK_EQUAL( I4_4I.contains(v4), true );
- BOOST_CHECK_EQUAL( I4_4I.contains(I4_4I), true );
- BOOST_CHECK_EQUAL( I4_4I.contained_in(I4_4I), true );
- BOOST_CHECK_EQUAL( I4_4I, I4_4I );
-
- BOOST_CHECK_EQUAL( I4_4I.cardinality(), unon<typename interval<T>::size_type>::value() );
- BOOST_CHECK_EQUAL( I4_4I.size(), unon<typename interval<T>::size_type>::value() );
- //BOOST_CHECK_EQUAL( I4_4I.length(), neutron<typename interval<T>::difference_type>::value() );
-
- itl::interval<T> j_4_4(I4_4I);
- BOOST_CHECK_EQUAL( I4_4I, j_4_4 );
- interval<T> k_4_4;
- k_4_4 = j_4_4;
- BOOST_CHECK_EQUAL( I4_4I, k_4_4 );
-
- T v2 = make<T>(2);
- BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4), interval<T>(v2, v4) );
- BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4), interval<T>(v2, v4, closed_bounded) );
- BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4), interval<T>(v2, v4, right_open) );
- BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4), interval<T>(v2, v4, left_open) );
- BOOST_CHECK_EQUAL( interval<T>::open(v2, v4), interval<T>(v2, v4, open_bounded) );
-
- BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).lower(), v2 );
- BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).upper(), v4 );
- BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).boundtype(), closed_bounded );
- BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is(closed_bounded), true );
- BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is_left(closed_bounded), true );
- BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is_right(closed_bounded), true );
-
- BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).lower(), v2 );
- BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).upper(), v4 );
- BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).boundtype(), right_open );
- BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).is(right_open), true );
- BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).is_left(closed_bounded), true );
- BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).is_right(open_bounded), true );
-
- BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).lower(), v2 );
- BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).upper(), v4 );
- BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).boundtype(), left_open );
- BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).is(left_open), true );
- BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).is_left(open_bounded), true );
- BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).is_right(closed_bounded), true );
-
- BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).lower(), v2 );
- BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).upper(), v4 );
- BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).boundtype(), open_bounded );
- BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is(open_bounded), true );
- BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is_left(open_bounded), true );
- BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is_right(open_bounded), true );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_ctor_4_integral_types, T, integral_types)
-{
- BOOST_CHECK_EQUAL(interval<T>().first(), itl::unon<T>::value());
- BOOST_CHECK_EQUAL(interval<T>().last(), itl::neutron<T>::value());
- BOOST_CHECK_EQUAL(interval<T>().length(), itl::neutron<typename interval<T>::difference_type>::value());
-
- BOOST_CHECK_EQUAL(interval<T>(0,0).length(), itl::unon<typename interval<T>::difference_type>::value());
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_ctor_specific)
-{
- BOOST_CHECK_EQUAL(interval<double>().length(), 0.0);
- BOOST_CHECK_EQUAL(interval<double>(5.0,5.0).cardinality(), 1);
- BOOST_CHECK_EQUAL(interval<std::string>("test","test").cardinality(), 1);
- BOOST_CHECK_EQUAL(interval<std::string>("best","test").cardinality(), interval<double>(0.0,0.1).cardinality());
-}
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_equal_4_integral_types, T, integral_types)
-{
- T v2 = make<T>(2);
- T v3 = make<T>(3);
- T v7 = make<T>(7);
- T v8 = make<T>(8);
- BOOST_CHECK_EQUAL(interval<T>(), interval<T>(v7,v3));
-
- //I: (I)nside = closed bound
- //C: left open bound
- //D: right open bound
- interval<T> I3_7I = interval<T>::closed(v3,v7);
- interval<T> I3__8D = interval<T>::rightopen(v3,v8);
- interval<T> C2__7I = interval<T>::leftopen(v2,v7);
- interval<T> C2___8D = interval<T>::open(v2,v8);
-
- BOOST_CHECK_EQUAL( I3_7I , I3_7I );
- BOOST_CHECK_EQUAL( I3_7I , I3__8D );
- BOOST_CHECK_EQUAL( I3_7I , C2__7I );
- BOOST_CHECK_EQUAL( I3_7I , C2___8D );
-
- BOOST_CHECK_EQUAL( I3__8D, I3__8D );
- BOOST_CHECK_EQUAL( I3__8D, C2__7I );
- BOOST_CHECK_EQUAL( I3__8D, C2___8D );
-
- BOOST_CHECK_EQUAL( C2__7I , C2__7I );
- BOOST_CHECK_EQUAL( C2__7I , C2___8D );
-
- BOOST_CHECK_EQUAL( C2___8D, C2___8D );
-}
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_less_4_integral_types, T, integral_types)
-{
- T v2 = make<T>(2);
- T v3 = make<T>(3);
- T v4 = make<T>(4);
- T v7 = make<T>(7);
- T v8 = make<T>(8);
- BOOST_CHECK_EQUAL(interval<T>() < interval<T>(v7,v3), false);
- BOOST_CHECK_EQUAL(interval<T>::open(v2,v3) < interval<T>::rightopen(v7,v7), false);
- BOOST_CHECK_EQUAL(interval<T>::leftopen(v3,v3) < interval<T>::closed(v7,v3), false);
-
- BOOST_CHECK_EQUAL(interval<T>() < interval<T>(v3,v3), true);
- BOOST_CHECK_EQUAL(interval<T>::open(v2,v3) < interval<T>::rightopen(v7,v8), true);
-
- //I: (I)nside = closed bound
- //C: left open bound
- //D: right open bound
- interval<T> I3_7I = interval<T>::closed(v3,v7);
- interval<T> I4_7I = interval<T>::closed(v4,v7);
-
- interval<T> I3__8D = interval<T>::rightopen(v3,v8);
- interval<T> C2__7I = interval<T>::leftopen(v2,v7);
- interval<T> C2___8D = interval<T>::open(v2,v8);
-
- BOOST_CHECK_EQUAL( I3_7I < I3_7I , false);
- BOOST_CHECK_EQUAL( I3_7I < I3__8D , false);
- BOOST_CHECK_EQUAL( I3_7I < C2__7I , false);
- BOOST_CHECK_EQUAL( I3_7I < C2___8D , false);
-
- BOOST_CHECK_EQUAL( I3_7I < I4_7I , true);
-
-
- BOOST_CHECK_EQUAL( I3__8D< I3__8D , false);
- BOOST_CHECK_EQUAL( I3__8D< C2__7I , false);
- BOOST_CHECK_EQUAL( I3__8D< C2___8D , false);
-
- BOOST_CHECK_EQUAL( C2__7I < C2__7I , false);
- BOOST_CHECK_EQUAL( C2__7I < C2___8D , false);
-
- BOOST_CHECK_EQUAL( C2___8D< C2___8D , false);
-}
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_equal_4_bicremental_continuous_types, T, bicremental_continuous_types)
-{
- T v3 = make<T>(3);
- T v7 = make<T>(7);
- BOOST_CHECK_EQUAL(interval<T>(), interval<T>(v7,v3));
-
- //I: (I)nside = closed bound
- //O: (O)utside = open bound
- interval<T> I3_7I = interval<T>::closed(v3,v7);
- interval<T> I3_7D = interval<T>::rightopen(v3,v7);
- interval<T> C3_7I = interval<T>::leftopen(v3,v7);
- interval<T> C3_7D = interval<T>::open(v3,v7);
-
- BOOST_CHECK_EQUAL( I3_7I , I3_7I );
- BOOST_CHECK_EQUAL( I3_7I == I3_7D, false );
- BOOST_CHECK_EQUAL( I3_7I == C3_7D, false );
- BOOST_CHECK_EQUAL( I3_7I == C3_7D, false );
- BOOST_CHECK_EQUAL( I3_7I != I3_7D, true );
- BOOST_CHECK_EQUAL( I3_7I != C3_7D, true );
- BOOST_CHECK_EQUAL( I3_7I != C3_7D, true );
-
- BOOST_CHECK_EQUAL( I3_7D , I3_7D );
- BOOST_CHECK_EQUAL( I3_7D == C3_7I, false );
- BOOST_CHECK_EQUAL( I3_7D == C3_7D, false );
- BOOST_CHECK_EQUAL( I3_7D != C3_7I, true );
- BOOST_CHECK_EQUAL( I3_7D != C3_7D, true );
-
- BOOST_CHECK_EQUAL( C3_7I , C3_7I );
- BOOST_CHECK_EQUAL( C3_7I == C3_7D, false );
- BOOST_CHECK_EQUAL( C3_7I != C3_7D, true );
-
- BOOST_CHECK_EQUAL( C3_7D, C3_7D );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_touches_4_bicremental_types, T, bicremental_types)
-{
- T v3 = make<T>(3);
- T v7 = make<T>(7);
- T v9 = make<T>(9);
-
- interval<T> I3_7D = interval<T>::rightopen(v3,v7);
- interval<T> I7_9I = interval<T>::closed(v7,v9);
- BOOST_CHECK_EQUAL( I3_7D.touches(I7_9I), true );
-
- interval<T> I3_7I = interval<T>::closed(v3,v7);
- interval<T> C7_9I = interval<T>::leftopen(v7,v9);
- BOOST_CHECK_EQUAL( I3_7I.touches(C7_9I), true );
-
- BOOST_CHECK_EQUAL( I3_7D.touches(C7_9I), false );
- BOOST_CHECK_EQUAL( I3_7I.touches(I7_9I), false );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_touches_4_integral_types, T, integral_types)
-{
- T v3 = make<T>(3);
- T v6 = make<T>(6);
- T v7 = make<T>(7);
- T v9 = make<T>(9);
-
- interval<T> I3_6I = interval<T>::closed(v3,v6);
- interval<T> I7_9I = interval<T>::closed(v7,v9);
- BOOST_CHECK_EQUAL( I3_6I.touches(I7_9I), true );
-
- interval<T> I3_7D = interval<T>::rightopen(v3,v7);
- interval<T> C6_9I = interval<T>::leftopen(v6,v9);
- BOOST_CHECK_EQUAL( I3_7D.touches(C6_9I), true );
-}
-
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_inplace_intersect_4_bicremental_types, T, bicremental_types)
-{
- T v0 = make<T>(0);
- T v3 = make<T>(3);
- T v4 = make<T>(4);
- T v5 = make<T>(5);
- T v6 = make<T>(6);
- T v7 = make<T>(7);
- T v9 = make<T>(9);
-
- interval<T> section;
- interval<T> I3_7D = interval<T>::rightopen(v3,v7);
-
- interval<T> I0_3D = interval<T>::rightopen(v0,v3);
- section = I3_7D; section &= I0_3D;
- BOOST_CHECK_EQUAL( I0_3D.is_disjoint(I3_7D), true );
- BOOST_CHECK_EQUAL( section.empty(), true );
- BOOST_CHECK_EQUAL( section, interval<T>() );
-
- interval<T> I0_5D = interval<T>::rightopen(v0,v5);
- section = I3_7D; section &= I0_5D;
- BOOST_CHECK_EQUAL( section, interval<T>::rightopen(v3, v5) );
-
- interval<T> I0_9D = interval<T>::rightopen(v0,v9);
- section = I3_7D; section &= I0_9D;
- BOOST_CHECK_EQUAL( section, I3_7D );
-
- interval<T> I4_5I = interval<T>::closed(v4,v5);
- section = I3_7D; section &= I4_5I;
- BOOST_CHECK_EQUAL( section, I4_5I );
-
- interval<T> C4_6D = interval<T>::open(v4,v6);
- section = I3_7D; section &= C4_6D;
- BOOST_CHECK_EQUAL( section, C4_6D );
-
- interval<T> C4_9I = interval<T>::leftopen(v4,v9);
- section = I3_7D; section &= C4_9I;
- BOOST_CHECK_EQUAL( section, interval<T>::open(v4,v7) );
-
- interval<T> I7_9I = interval<T>::closed(v7,v9);
- section = I3_7D; section &= I7_9I;
- BOOST_CHECK_EQUAL( I3_7D.exclusive_less(I7_9I), true );
- BOOST_CHECK_EQUAL( I3_7D.is_disjoint(I7_9I), true );
- BOOST_CHECK_EQUAL( section.empty(), true );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_infix_intersect_4_bicremental_types, T, bicremental_types)
-{
- T v0 = make<T>(0);
- T v3 = make<T>(3);
- T v4 = make<T>(4);
- T v5 = make<T>(5);
- T v6 = make<T>(6);
- T v7 = make<T>(7);
- T v9 = make<T>(9);
-
- interval<T> section;
- interval<T> I3_7D = interval<T>::rightopen(v3,v7);
-
- interval<T> I0_3D = interval<T>::rightopen(v0,v3);
- section = I3_7D & I0_3D;
- BOOST_CHECK_EQUAL( I0_3D.is_disjoint(I3_7D), true );
- BOOST_CHECK_EQUAL( section.empty(), true );
- BOOST_CHECK_EQUAL( section, interval<T>() );
-
- interval<T> I0_5D = interval<T>::rightopen(v0,v5);
- section = I3_7D & I0_5D;
- BOOST_CHECK_EQUAL( section, interval<T>::rightopen(v3, v5) );
-
- interval<T> I0_9D = interval<T>::rightopen(v0,v9);
- section = I3_7D & I0_9D;
- BOOST_CHECK_EQUAL( section, I3_7D );
-
- interval<T> I4_5I = interval<T>::closed(v4,v5);
- section = I3_7D & I4_5I;
- BOOST_CHECK_EQUAL( section, I4_5I );
-
- interval<T> C4_6D = interval<T>::open(v4,v6);
- section = I3_7D & C4_6D;
- BOOST_CHECK_EQUAL( section, C4_6D );
-
- interval<T> C4_9I = interval<T>::leftopen(v4,v9);
- section = I3_7D & C4_9I;
- BOOST_CHECK_EQUAL( section, interval<T>::open(v4,v7) );
-
- interval<T> I7_9I = interval<T>::closed(v7,v9);
- section = I3_7D & I7_9I;
- BOOST_CHECK_EQUAL( I3_7D.exclusive_less(I7_9I), true );
- BOOST_CHECK_EQUAL( I3_7D.is_disjoint(I7_9I), true );
- BOOST_CHECK_EQUAL( section.empty(), true );
-}
-
-BOOST_AUTO_TEST_CASE_TEMPLATE_TEMPLATE(test_itl_interval_subtract_4_bicremental_types, T, bicremental_types)
-{
- T v0 = make<T>(0);
- T v2 = make<T>(2);
- T v3 = make<T>(3);
- T v4 = make<T>(4);
- T v6 = make<T>(6);
- T v7 = make<T>(7);
-
- interval<T> diff_1, diff_2;
- interval<T> I0_3D = interval<T>::rightopen(v0,v3);
- interval<T> I2_6D = interval<T>::rightopen(v2,v6);
- interval<T> I4_7D = interval<T>::rightopen(v4,v7);
- interval<T> I6_7D = interval<T>::rightopen(v6,v7);
- interval<T> I2_4D = interval<T>::rightopen(v2,v4);
-
- diff_1 = right_subtract(I2_6D, I4_7D);
- BOOST_CHECK_EQUAL( diff_1, I2_4D );
-
- diff_2 = I2_6D;
- diff_2.right_subtract(I4_7D);
- BOOST_CHECK_EQUAL( diff_2, I2_4D );
-
- diff_1.clear();
- diff_1 = right_subtract(I0_3D, I4_7D);
- BOOST_CHECK_EQUAL( diff_1, I0_3D );
-
- // ---------------------------------
- diff_1 = left_subtract(I4_7D, I2_6D);
- BOOST_CHECK_EQUAL( diff_1, I6_7D );
-
- diff_2 = I4_7D;
- diff_2.left_subtract(I2_6D);
- BOOST_CHECK_EQUAL( diff_2, I6_7D );
-
- diff_1.clear();
- diff_1 = left_subtract(I4_7D, I0_3D);
- BOOST_CHECK_EQUAL( diff_1, I4_7D );
-
- diff_2 = I4_7D;
- diff_2.left_subtract(I0_3D);
- BOOST_CHECK_EQUAL( diff_2, I4_7D );
-}
-*/
+(test_itl_interval_less_4_integral_types, T, integral_types)
+{ interval_less_4_integral_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_equal_4_bicremental_continuous_types, T, bicremental_continuous_types)
+{ interval_equal_4_bicremental_continuous_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_touches_4_bicremental_types, T, bicremental_types)
+{ interval_touches_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_touches_4_integral_types, T, integral_types)
+{ interval_touches_4_integral_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_inplace_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_inplace_intersect_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_infix_intersect_4_bicremental_types, T, bicremental_types)
+{ interval_infix_intersect_4_bicremental_types<T>(); }
+
+BOOST_AUTO_TEST_CASE_TEMPLATE
+(test_itl_interval_subtract_4_bicremental_types, T, bicremental_types)
+{ interval_subtract_4_bicremental_types<T>(); }
 

Modified: sandbox/itl/libs/itl/test/test_type_lists.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_type_lists.hpp (original)
+++ sandbox/itl/libs/itl/test/test_type_lists.hpp 2009-10-01 05:04:16 EDT (Thu, 01 Oct 2009)
@@ -25,7 +25,7 @@
 
 typedef ::boost::mpl::list<
     unsigned short, unsigned int, unsigned long
- ,short, int, long
+ ,short, int, long, long long
     ,float, double, long double
     ,boost::rational<int>
     ,boost_posix_time_ptime
@@ -57,8 +57,9 @@
 
 
 typedef ::boost::mpl::list<
- unsigned short, unsigned int, unsigned long
- ,short, int, long
+ unsigned short, unsigned int
+ ,unsigned long, unsigned long long
+ ,short, int, long, long long
> integral_types;
 
 typedef int integral_type_1;
@@ -67,7 +68,8 @@
 typedef unsigned int integral_type_4;
 
 typedef ::boost::mpl::list<
- unsigned short, unsigned int, unsigned long
+ unsigned short, unsigned int
+ ,unsigned long, unsigned long long
     ,short, int, long
     ,boost_posix_time_ptime
 // ,boost::gregorian::date
@@ -91,8 +93,9 @@
 typedef std::string continuous_type_4;
 
 typedef ::boost::mpl::list<
- unsigned short, unsigned int, unsigned long
- ,short, int, long
+ unsigned short, unsigned int
+ ,unsigned long, unsigned long long
+ ,short, int, long, long long
     ,float, double, long double
     ,boost::rational<int>
     ,std::string


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