Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r49765 - in sandbox/itl: boost/itl boost/itl_xt boost/validate/gentor 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/party libs/itl/example/user_groups libs/itl/test libs/itl/test/test_interval_map_mixed libs/itl/test/test_interval_set_mixed libs/itl/test/test_itl_interval libs/itl_xt/example/history
From: afojgo_at_[hidden]
Date: 2008-11-15 05:59:49


Author: jofaber
Date: 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
New Revision: 49765
URL: http://svn.boost.org/trac/boost/changeset/49765

Log:
Refactored: Introduced a template template parameter Compare to itl::interval and passed
the Compare parameter from all interval containers to their interval types.
Replaced constructor function templates for open/closed intervals by static member functions.
1. Committing non conflicted files. Stable {msvc-9.0}
Text files modified:
   sandbox/itl/boost/itl/interval.hpp | 261 +++++++++++++++++++--------------------
   sandbox/itl/boost/itl/interval_map_algo.hpp | 30 ----
   sandbox/itl/boost/itl/interval_maps.hpp | 169 +++++++++++++++++++------
   sandbox/itl/boost/itl/interval_sets.hpp | 130 +++++++++---------
   sandbox/itl/boost/itl/map.hpp | 52 +++---
   sandbox/itl/boost/itl/set.hpp | 48 +++---
   sandbox/itl/boost/itl_xt/episode_set.hpp | 4
   sandbox/itl/boost/itl_xt/mapgentor.hpp | 2
   sandbox/itl/boost/itl_xt/numbergentor.hpp | 2
   sandbox/itl/boost/itl_xt/setgentor.hpp | 2
   sandbox/itl/boost/itl_xt/tuple_computer.hpp | 9
   sandbox/itl/boost/validate/gentor/gentorprofile.h | 12
   sandbox/itl/libs/itl/example/boost_party/boost_party.cpp | 12
   sandbox/itl/libs/itl/example/interval/interval.cpp | 10
   sandbox/itl/libs/itl/example/interval_container/interval_container.cpp | 8
   sandbox/itl/libs/itl/example/man_power/man_power.cpp | 8
   sandbox/itl/libs/itl/example/month_and_week_grid/month_and_week_grid.cpp | 6
   sandbox/itl/libs/itl/example/overlap_counter/overlap_counter.cpp | 6
   sandbox/itl/libs/itl/example/party/party.cpp | 6
   sandbox/itl/libs/itl/example/user_groups/user_groups.cpp | 12
   sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp | 194 ++++++++++++++--------------
   sandbox/itl/libs/itl/test/test_interval_map_shared.hpp | 134 ++++++++++----------
   sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp | 100 +++++++-------
   sandbox/itl/libs/itl/test/test_interval_set_shared.hpp | 74 +++++-----
   sandbox/itl/libs/itl/test/test_itl_interval/test_itl_interval.cpp | 118 +++++++++---------
   sandbox/itl/libs/itl_xt/example/history/history.cpp | 12
   26 files changed, 735 insertions(+), 686 deletions(-)

Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp (original)
+++ sandbox/itl/boost/itl/interval.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -297,7 +297,7 @@
 
     @author Joachim Faulhaber
 */
-template <class DataT>
+template <class DataT, template<class>class Compare = std::less>
 class interval
 {
 public:
@@ -307,6 +307,8 @@
 //@{
     /// Domain type or element type
     typedef DataT data_type;
+ /// Compare order on the data
+ typedef Compare<DataT> domain_compare;
 
     /// The difference type of an interval which is sometimes different form the data_type
     typedef typename itl::difference<DataT>::type difference_type;
@@ -341,12 +343,24 @@
     /// Constructor for a closed singleton interval <tt>[val,val]</tt>
     explicit interval(const DataT& val) :
         _lwb(val), _upb(val), _boundtypes(CLOSED) {}
- /// Closed interval <tt>[lw,up]</tt>
- interval(const DataT& lw, const DataT& up) :
- _lwb(lw), _upb(up), _boundtypes(CLOSED) {}
- /// Interval from <tt>lw</tt> to <tt>up</tt> with bounds <tt>bt</tt>
- interval(const DataT& lw, const DataT& up, bound_types bt) :
- _lwb(lw), _upb(up), _boundtypes(bt) {}
+ /// Closed interval <tt>[low,up]</tt>
+ interval(const DataT& low, const DataT& up) :
+ _lwb(low), _upb(up), _boundtypes(CLOSED) {}
+ /// Interval from <tt>low</tt> to <tt>up</tt> with bounds <tt>bt</tt>
+ interval(const DataT& low, const DataT& up, bound_types bt) :
+ _lwb(low), _upb(up), _boundtypes(bt) {}
+
+ static interval closed(const DataT& low, const DataT& up)
+ { return interval(low, up, CLOSED); }
+
+ static interval rightopen(const DataT& low, const DataT& up)
+ { return interval(low, up, RIGHT_OPEN); }
+
+ static interval leftopen(const DataT& low, const DataT& up)
+ { return interval(low, up, LEFT_OPEN); }
+
+ static interval open(const DataT& low, const DataT& up)
+ { return interval(low, up, OPEN); }
 
     // Use compiler generated assignment operator =
 
@@ -544,7 +558,7 @@
 //@{
     /// Maximum Interval
     static interval always()
- { return closed_interval(std::numeric_limits<DataT>::min(),
+ { return interval<T>::closed(std::numeric_limits<DataT>::min(),
                              std::numeric_limits<DataT>::max()); }
 //@}
 
@@ -560,9 +574,15 @@
 
 public:
     typedef typename boost::call_traits<DataT>::param_type DataP;
- inline static bool data_less(DataP left, DataP right) {return left < right ;}
- inline static bool data_less_equal(DataP left, DataP right) {return !(right < left );}
- inline static bool data_equal(DataP left, DataP right) {return !(left < right) && !(right < left);}
+
+ inline static bool data_less(DataP left, DataP right)
+ {return domain_compare()(left, right) ;}
+
+ inline static bool data_less_equal(DataP left, DataP right)
+ {return !domain_compare()(right, left );}
+
+ inline static bool data_equal(DataP left, DataP right)
+ {return !domain_compare()(left, right) && !domain_compare()(right, left);}
 
 private:
     // public?
@@ -597,29 +617,8 @@
 } ;
 
 
-
-
-template <class DataT>
-interval<DataT> closed_interval(const DataT& lwb, const DataT& upb)
-{ return interval<DataT>(lwb, upb, interval<DataT>::CLOSED); }
-
-template <class DataT>
-interval<DataT> leftopen_interval(const DataT& lwb, const DataT& upb)
-{ return interval<DataT>(lwb, upb, interval<DataT>::LEFT_OPEN); }
-
-template <class DataT>
-interval<DataT> rightopen_interval(const DataT& lwb, const DataT& upb)
-{ return interval<DataT>(lwb, upb, interval<DataT>::RIGHT_OPEN); }
-
-template <class DataT>
-interval<DataT> open_interval(const DataT& lwb, const DataT& upb)
-{ return interval<DataT>(lwb, upb, interval<DataT>::OPEN); }
-
-
-
-
-template <class DataT>
-typename interval<DataT>::bound_types interval<DataT>::succession_bounds()const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::bound_types interval<DataT,Compare>::succession_bounds()const
 {
     if(_boundtypes==RIGHT_OPEN) return RIGHT_OPEN;
     if(_boundtypes==LEFT_OPEN) return LEFT_OPEN;
@@ -652,8 +651,8 @@
         { return IntervalT::data_less(succ(x),y); } //{ return succ(x) < y ; }
 };
 
-template <class DataT>
-bool interval<DataT>::empty()const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::empty()const
 {
     using namespace boost::mpl;
 
@@ -665,8 +664,8 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_type<interval<DataT> >,
- discrete_type<interval<DataT> >
+ continuous_type<interval<DataT,Compare> >,
+ discrete_type<interval<DataT,Compare> >
>
            ::type::open_bound_less_equal(_upb, _lwb);
 }
@@ -732,8 +731,8 @@
 
 // NOTE structural similarities between empty and exclusive_less!
 // emptieness can be defined as being exclusive less to oneself.
-template <class DataT>
-bool interval<DataT>::exclusive_less(const interval& x2)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::exclusive_less(const interval& x2)const
 {
     using namespace boost::mpl;
     if(rightbound_closed() && x2.leftbound_closed()) return data_less(_upb, x2._lwb); //_upb < x2._lwb
@@ -743,15 +742,15 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_type<interval<DataT> >,
- discrete_type<interval<DataT> >
+ continuous_type<interval<DataT,Compare> >,
+ discrete_type<interval<DataT,Compare> >
>
            ::type::open_bound_less_equal(_upb, x2._lwb);
 }
 
 
-template <class DataT>
-bool interval<DataT>::lower_less(const interval& x2)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::lower_less(const interval& x2)const
 {
     using namespace boost::mpl;
     if(leftbound_closed() && x2.leftbound_closed()) return data_less(_lwb, x2._lwb);
@@ -762,14 +761,14 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_type<interval<DataT> >,
- discrete_type<interval<DataT> >
+ continuous_type<interval<DataT,Compare> >,
+ discrete_type<interval<DataT,Compare> >
>
            ::type::open_bound_less(_lwb, x2._lwb);
 }
 
-template <class DataT>
-bool interval<DataT>::upper_less(const interval& x2)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::upper_less(const interval& x2)const
 {
     using namespace boost::mpl;
     if(rightbound_closed() && x2.rightbound_closed()) return data_less(_upb, x2._upb);
@@ -780,15 +779,15 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_type<interval<DataT> >,
- discrete_type<interval<DataT> >
+ continuous_type<interval<DataT,Compare> >,
+ discrete_type<interval<DataT,Compare> >
>
            ::type::open_bound_less(_upb, x2._upb);
 }
 
 
-template <class DataT>
-bool interval<DataT>::lower_less_equal(const interval& x2)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::lower_less_equal(const interval& x2)const
 {
     using namespace boost::mpl;
     if(leftbound_closed() && x2.leftbound_closed()) return data_less_equal(_lwb, x2._lwb);
@@ -799,15 +798,15 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_type<interval<DataT> >,
- discrete_type<interval<DataT> >
+ continuous_type<interval<DataT,Compare> >,
+ discrete_type<interval<DataT,Compare> >
>
            ::type::open_bound_less_equal(_lwb, x2._lwb);
 }
 
 
-template <class DataT>
-bool interval<DataT>::upper_less_equal(const interval& x2)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::upper_less_equal(const interval& x2)const
 {
     using namespace boost::mpl;
     if(rightbound_closed() && x2.rightbound_closed()) return data_less_equal(_upb, x2._upb);
@@ -818,8 +817,8 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_type<interval<DataT> >,
- discrete_type<interval<DataT> >
+ continuous_type<interval<DataT,Compare> >,
+ discrete_type<interval<DataT,Compare> >
>
            ::type::open_bound_less_equal(_upb, x2._upb);
 }
@@ -827,8 +826,8 @@
 
 //NOTE THINK: This implementation is rather interesting wrt. continuous value types.
 // An alternative implementation was x.lwb_equal(y)={return x.lower_less_equal(y) && y.lower_less_equal(x)}
-template <class DataT>
-bool interval<DataT>::lower_equal(const interval& x2)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::lower_equal(const interval& x2)const
 {
     using namespace boost::mpl;
     if(leftbound_closed() && x2.leftbound_closed()) return data_equal(_lwb, x2._lwb);
@@ -837,16 +836,16 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_interval<interval<DataT> >,
- discrete_interval<interval<DataT> >
+ continuous_interval<interval<DataT,Compare> >,
+ discrete_interval<interval<DataT,Compare> >
>
            ::type::unaligned_lwb_equal(*this, x2);
 }
 
 //NOTE THINK: This implementation is rather interesting wrt. continuous value types.
 // An alternative implementation was x.lwb_equal(y)={return x.lower_less_equal(y) && y.lower_less_equal(x)}
-template <class DataT>
-bool interval<DataT>::upper_equal(const interval& x2)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::upper_equal(const interval& x2)const
 {
     using namespace boost::mpl;
     if(rightbound_closed() && x2.rightbound_closed()) return data_equal(_upb, x2._upb);
@@ -855,16 +854,16 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_interval<interval<DataT> >,
- discrete_interval<interval<DataT> >
+ continuous_interval<interval<DataT,Compare> >,
+ discrete_interval<interval<DataT,Compare> >
>
            ::type::unaligned_upb_equal(*this, x2);
 }
 
 
 
-template <class DataT>
-typename interval<DataT>::BoundT interval<DataT>::lwb_min(const interval& x2)const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::BoundT interval<DataT,Compare>::lwb_min(const interval& x2)const
 {
     if( x2.lower_less(*this) )
         return BoundT(x2._lwb, x2.boundtypes());
@@ -872,8 +871,8 @@
         return BoundT(_lwb, boundtypes());
 }
 
-template <class DataT>
-typename interval<DataT>::BoundT interval<DataT>::upb_max(const interval& x2)const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::BoundT interval<DataT,Compare>::upb_max(const interval& x2)const
 {
     if( upper_less(x2) )
         return BoundT(x2._upb, x2.boundtypes());
@@ -883,8 +882,8 @@
 
 
 // JODO THINK URG do borders reverse when lwb_max is used as upb etc. ?
-template <class DataT>
-typename interval<DataT>::BoundT interval<DataT>::lwb_max(const interval& x2)const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::BoundT interval<DataT,Compare>::lwb_max(const interval& x2)const
 {
     if( lower_less(x2) )
         return BoundT(x2._lwb, x2.boundtypes());
@@ -892,8 +891,8 @@
         return BoundT(_lwb, boundtypes());
 }
 
-template <class DataT>
-typename interval<DataT>::BoundT interval<DataT>::upb_min(const interval& x2)const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::BoundT interval<DataT,Compare>::upb_min(const interval& x2)const
 {
     if( x2.upper_less(*this) )
         return BoundT(x2._upb, x2.boundtypes());
@@ -902,22 +901,22 @@
 }
 
 
-template <class DataT>
-typename interval<DataT>::BoundT interval<DataT>::upb_leftOf(const interval& x2)const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::BoundT interval<DataT,Compare>::upb_leftOf(const interval& x2)const
 {
     return BoundT(x2._lwb, x2.succession_bounds());
 }
 
-template <class DataT>
-typename interval<DataT>::BoundT interval<DataT>::lwb_rightOf(const interval& x2)const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::BoundT interval<DataT,Compare>::lwb_rightOf(const interval& x2)const
 {
     return BoundT(x2._upb, x2.succession_bounds());
 }
 
 
 // NOTE non symmetric version: *this[upb].touches(x2[lwb])
-template <class DataT>
-bool interval<DataT>::touches(const interval& x2)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::touches(const interval& x2)const
 {
     using namespace boost::mpl;
     if(rightbound_open() && x2.leftbound_closed()) return data_equal(_upb, x2._lwb);
@@ -926,14 +925,14 @@
     return
         if_<
             bool_<is_continuous<DataT>::value>,
- continuous_interval<interval<DataT> >,
- discrete_interval<interval<DataT> >
+ continuous_interval<interval<DataT,Compare> >,
+ discrete_interval<interval<DataT,Compare> >
>
            ::type::has_equal_border_touch(*this, x2);
 }
 
-template <class DataT>
-bool interval<DataT>::contains(const DataT& x)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::contains(const DataT& x)const
 {
     if(rightbound_closed() && leftbound_closed()) return data_less_equal(_lwb, x) && data_less_equal(x, _upb);
     if(rightbound_closed() && leftbound_open() ) return data_less(_lwb, x) && data_less_equal(x, _upb);
@@ -941,17 +940,17 @@
                                                   return data_less(_lwb, x) && data_less(x, _upb);
 }
 
-template <class DataT>
-bool interval<DataT>::contained_in(const interval& super)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::contained_in(const interval& super)const
 { return super.lower_less_equal(*this) && upper_less_equal(super); }
 
-template <class DataT>
-bool interval<DataT>::contains(const interval& sub)const
+template <class DataT, template<class>class Compare>
+bool interval<DataT,Compare>::contains(const interval& sub)const
 { return lower_less_equal(sub) && sub.upper_less_equal(*this); }
 
 
-template <class DataT>
-interval<DataT>& interval<DataT>::extend(const interval<DataT>& x2)
+template <class DataT, template<class>class Compare>
+interval<DataT,Compare>& interval<DataT,Compare>::extend(const interval<DataT,Compare>& x2)
 {
     if(x2.empty()) return *this;
     else if(empty())
@@ -968,24 +967,24 @@
 }
 
 
-template <class DataT>
-inline interval<DataT>& interval<DataT>::left_subtract(const interval& x2)
+template <class DataT, template<class>class Compare>
+inline interval<DataT,Compare>& interval<DataT,Compare>::left_subtract(const interval& x2)
 {
     set_lwb( BoundT(x2._upb, x2.succession_bounds()) );
     return *this;
 }
 
 
-template <class DataT>
-void interval<DataT>::intersect(interval<DataT>& isec, const interval<DataT>& x2)const
+template <class DataT, template<class>class Compare>
+void interval<DataT,Compare>::intersect(interval<DataT,Compare>& isec, const interval<DataT,Compare>& x2)const
 {
     isec.set_lwb(lwb_max(x2));
     isec.set_upb(upb_min(x2));
 }
 
 
-template <class DataT>
-void interval<DataT>::left_surplus(interval<DataT>& lsur, const interval<DataT>& x2)const
+template <class DataT, template<class>class Compare>
+void interval<DataT,Compare>::left_surplus(interval<DataT,Compare>& lsur, const interval<DataT,Compare>& x2)const
 {
     if(lower_less(x2)) {
         lsur.set_lwb( BoundT(_lwb,boundtypes()) );
@@ -994,8 +993,8 @@
     else lsur.clear();
 }
 
-template <class DataT>
-void interval<DataT>::right_surplus(interval<DataT>& rsur, const interval<DataT>& x2)const
+template <class DataT, template<class>class Compare>
+void interval<DataT,Compare>::right_surplus(interval<DataT,Compare>& rsur, const interval<DataT,Compare>& x2)const
 {
     if(x2.upper_less(*this)) {
         rsur.set_lwb(lwb_rightOf(x2));
@@ -1005,8 +1004,8 @@
 }
 
 
-template <class DataT>
-const std::string interval<DataT>::as_string()const
+template <class DataT, template<class>class Compare>
+const std::string interval<DataT,Compare>::as_string()const
 {
     std::string itvRep("");
     std::string lwbRep, ubpRep;
@@ -1027,8 +1026,8 @@
 // NOTE: they must be used in any function that is essential to all instances
 // of DataT
 
-template <class DataT>
-DataT interval<DataT>::first()const
+template <class DataT, template<class>class Compare>
+DataT interval<DataT,Compare>::first()const
 {
     //JODO: BOOST_STATIC_ASSERT generates compiletime error even if
     // code is correctly not used
@@ -1037,52 +1036,52 @@
     return leftbound_closed() ? _lwb : succ(_lwb);
 }
 
-template <class DataT>
-DataT interval<DataT>::last()const
+template <class DataT, template<class>class Compare>
+DataT interval<DataT,Compare>::last()const
 {
     BOOST_ASSERT(!itl::is_continuous<DataT>::value);
     return rightbound_closed() ? _upb : pred(_upb);
 }
 
-template <class DataT>
-typename interval<DataT>::size_type interval<DataT>::cardinality()const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::size_type interval<DataT,Compare>::cardinality()const
 {
     using namespace boost::mpl;
     return if_<
                 bool_<is_continuous<DataT>::value>,
- continuous_interval<interval<DataT> >,
- discrete_interval<interval<DataT> >
+ continuous_interval<interval<DataT,Compare> >,
+ discrete_interval<interval<DataT,Compare> >
>
               ::type::cardinality(*this);
 }
 
-template <class DataT>
-typename interval<DataT>::difference_type interval<DataT>::length()const
+template <class DataT, template<class>class Compare>
+typename interval<DataT,Compare>::difference_type interval<DataT,Compare>::length()const
 {
     using namespace boost::mpl;
     return if_<
                 bool_<is_continuous<DataT>::value>,
- continuous_interval<interval<DataT> >,
- discrete_interval<interval<DataT> >
+ continuous_interval<interval<DataT,Compare> >,
+ discrete_interval<interval<DataT,Compare> >
>
               ::type::length(*this);
 }
 
 
-template <class DataT>
-interval<DataT> interval<DataT>::as_closed_interval()const
+template <class DataT, template<class>class Compare>
+interval<DataT,Compare> interval<DataT,Compare>::as_closed_interval()const
 {
     return interval(first(), last(), CLOSED);
 }
 
-template <class DataT>
-interval<DataT> interval<DataT>::as_rightopen_interval()const
+template <class DataT, template<class>class Compare>
+interval<DataT,Compare> interval<DataT,Compare>::as_rightopen_interval()const
 {
     return interval(first(), pred(last()), RIGHT_OPEN);
 }
 
-template <class DataT>
-void interval<DataT>::transform_bounds(bound_types bt)
+template <class DataT, template<class>class Compare>
+void interval<DataT,Compare>::transform_bounds(bound_types bt)
 {
     switch(bt)
     {
@@ -1093,8 +1092,8 @@
     }
 }
 
-template <class DataT>
-void interval<DataT>::close_left_bound()
+template <class DataT, template<class>class Compare>
+void interval<DataT,Compare>::close_left_bound()
 {
     if(leftbound_open())
     {
@@ -1103,8 +1102,8 @@
     }
 }
 
-template <class DataT>
-void interval<DataT>::open_right_bound()
+template <class DataT, template<class>class Compare>
+void interval<DataT,Compare>::open_right_bound()
 {
     if(rightbound_closed())
     {
@@ -1115,14 +1114,14 @@
 
 
 
-template <typename DataT>
-inline bool operator == (const interval<DataT>& lhs, const interval<DataT>& rhs)
+template <class DataT, template<class>class Compare>
+inline bool operator == (const interval<DataT,Compare>& lhs, const interval<DataT,Compare>& rhs)
 {
     return lhs.equal(rhs);
 }
 
-template <typename DataT>
-inline bool operator < (const interval<DataT>& lhs, const interval<DataT>& rhs)
+template <class DataT, template<class>class Compare>
+inline bool operator < (const interval<DataT,Compare>& lhs, const interval<DataT,Compare>& rhs)
 {
     return lhs.less(rhs);
 }
@@ -1156,17 +1155,17 @@
 // ----------------------------------------------------------------------------
 // operators
 // ----------------------------------------------------------------------------
-template <class DataT>
-itl::interval<DataT>& operator *= ( itl::interval<DataT>& section,
- const itl::interval<DataT>& sectant)
+template <class DataT, template<class>class Compare>
+itl::interval<DataT,Compare>& operator *= ( itl::interval<DataT,Compare>& section,
+ const itl::interval<DataT,Compare>& sectant)
 {
     section.intersect(section, sectant);
     return section;
 }
 
-template<class CharType, class CharTraits, class DataT>
+template<class CharType, class CharTraits, class DataT, template<class>class Compare>
 std::basic_ostream<CharType, CharTraits> &operator<<
- (std::basic_ostream<CharType, CharTraits> &stream, interval<DataT> const& x)
+ (std::basic_ostream<CharType, CharTraits> &stream, interval<DataT,Compare> const& x)
 {
     if(x.empty())
         return stream << "[]";

Modified: sandbox/itl/boost/itl/interval_map_algo.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map_algo.hpp (original)
+++ sandbox/itl/boost/itl/interval_map_algo.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -140,36 +140,6 @@
     return step.result();
 }
 
-/*CL
-template<class LeftT, class RightT>
-int lexicographical_compare(LeftT::const_iterator left_begin, LeftT::const_iterator left_end,
- RightT::const_iterator right_begin, RightT::const_iterator right_end)
-{
- if(left.empty())
- return right.empty();
- else if(right.empty())
- return false;
-
- typedef interval_map_sequence_tracker<LeftT,RightT> Step;
- Step step(left_end, right_end);
-
- typename LeftT::const_iterator left_ = left.begin();
- typename RightT::const_iterator right_ = right.begin();
-
- int state = Step::nextboth;
- while(state != Step::stop)
- {
- switch(state){
- case Step::nextboth: state = step.next_both(left_, right_); break;
- case Step::nextleft: state = step.next_left(left_, right_); break;
- case Step::nextright: state = step.next_right(left_, right_); break;
- case Step::leftaligned: state = step.proceed(left_, right_); break;
- }
- }
- return step.result();
-}
-*/
-
 } //Map
     
 }} // namespace itl boost

Modified: sandbox/itl/boost/itl/interval_maps.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_maps.hpp (original)
+++ sandbox/itl/boost/itl/interval_maps.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -16,8 +16,8 @@
 
 template
 <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
 class interval_map;
 
@@ -28,12 +28,12 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -58,12 +58,12 @@
 template
 <
     class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -98,12 +98,12 @@
 template
 <
     class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -127,12 +127,12 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -169,12 +169,12 @@
 template
 <
     class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -195,12 +195,12 @@
 template
 <
     class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -224,12 +224,12 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -252,12 +252,12 @@
 template
 <
     class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -281,7 +281,7 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     class OperandT
>
@@ -304,7 +304,7 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     class OperandT
>
@@ -327,7 +327,7 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     class SectanT
>
@@ -353,18 +353,18 @@
 template
 <
     class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class LeftIntervalMap,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class RightIntervalMap
>
@@ -388,12 +388,12 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -433,15 +433,16 @@
 }
 
 //--- IntervalSet -------------------------------------------------------------
+/*CL
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -477,7 +478,87 @@
 
     return true;
 }
+*/
+
+template
+<
+ class DomainT, class CodomainT,
+ class Traits, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
+ template
+ <
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
+ >
+ class IntervalMap,
+ template
+ <
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
+ >
+ class IntervalSet
+>
+//JODO boost::enable_if
+bool is_disjoint
+(
+ const IntervalMap<DomainT,CodomainT,
+ Traits,Interval,Compare,Alloc>& object,
+ const IntervalSet<DomainT,Interval,Compare,Alloc>& operand
+)
+{
+ typedef IntervalMap<DomainT,CodomainT,
+ Traits,Interval,Compare,Alloc> object_type;
+ typedef IntervalSet<DomainT,Interval,Compare,Alloc> operand_type;
+ object_type intersection;
 
+ if(operand.empty())
+ return true;
+
+ typename operand_type::const_iterator common_lwb;
+ typename operand_type::const_iterator common_upb;
+
+ if(!Set::common_range(common_lwb, common_upb, operand, object))
+ return true;
+
+ typename operand_type::const_iterator it = common_lwb;
+ while(it != common_upb)
+ {
+ object.add_intersection(intersection, *it++);
+ if(!intersection.empty())
+ return false;
+ }
+
+ return true;
+}
+
+template
+<
+ class DomainT, class CodomainT,
+ class Traits, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
+ template
+ <
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
+ >
+ class IntervalMap,
+ template
+ <
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
+ >
+ class IntervalSet
+>
+//JODO boost::enable_if
+bool is_disjoint
+(
+ const IntervalSet<DomainT,Interval,Compare,Alloc>& left,
+ const IntervalMap<DomainT,CodomainT,
+ Traits,Interval,Compare,Alloc>& right
+)
+{
+ return is_disjoint(right, left);
+}
 
 //-----------------------------------------------------------------------------
 // enclosure
@@ -485,12 +566,12 @@
 template
 <
     class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -508,7 +589,7 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
+ class Traits, template<class,template<class>class>class Interval,
     template<class>class Compare, template<class>class Alloc
>
 typename interval_base_map<SubType,DomainT,CodomainT,Traits,Interval,Compare,Alloc>::interval_type

Modified: sandbox/itl/boost/itl/interval_sets.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_sets.hpp (original)
+++ sandbox/itl/boost/itl/interval_sets.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -14,8 +14,8 @@
 namespace boost{namespace itl
 {
 
-template<typename, template<class>class,
- class, template<class>class>
+template<typename, template<class,template<class>class>class,
+ template<class>class, template<class>class>
 class interval_set;
 
 //-----------------------------------------------------------------------------
@@ -23,12 +23,12 @@
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class SubType, class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -49,12 +49,12 @@
 //--- interval_type -----------------------------------------------------------
 template
 <
- class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -71,12 +71,12 @@
 //--- domain_type -------------------------------------------------------------
 template
 <
- class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -96,12 +96,12 @@
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class SubType, class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -122,12 +122,12 @@
 //--- interval_type -----------------------------------------------------------
 template
 <
- class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -144,12 +144,12 @@
 //--- domain_type -------------------------------------------------------------
 template
 <
- class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -169,12 +169,12 @@
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class SubType, class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -216,12 +216,12 @@
 //--- interval_type -----------------------------------------------------------
 template
 <
- class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -249,12 +249,12 @@
 //--- domain_type -------------------------------------------------------------
 template
 <
- class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -262,7 +262,7 @@
 operator *=
 (
     IntervalSet<DomainT,Interval,Compare,Alloc>& object,
- const typename IntervalSet<DomainT,Interval,Compare,Alloc>::domain_type& value
+ const DomainT& value
 )
 {
     typedef typename IntervalSet<DomainT,Interval,Compare,Alloc>
@@ -275,12 +275,12 @@
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class SubType, class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -300,12 +300,12 @@
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class SubType, class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -342,12 +342,12 @@
 template
 <
     class SubType, class DomainT, class CodomainT,
- class Traits, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class Traits, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, class, class, template<class>class,
- class, template<class>class
+ class, class, class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalMap
>
@@ -391,12 +391,12 @@
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class SubType, class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -415,12 +415,12 @@
 //-----------------------------------------------------------------------------
 template
 <
- class SubType, class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class SubType, class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -440,12 +440,12 @@
 //-----------------------------------------------------------------------------
 template
 <
- class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc,
+ class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc,
     template
     <
- class, template<class>class,
- class, template<class>class
+ class, template<class,template<class>class>class,
+ template<class>class, template<class>class
>
     class IntervalSet
>
@@ -461,8 +461,8 @@
 
 template
 <
- class SubType, class DomainT, template<class>class Interval,
- class Compare, template<class>class Alloc
+ class SubType, class DomainT, template<class,template<class>class>class Interval,
+ template<class>class Compare, template<class>class Alloc
>
 typename interval_base_set<SubType,DomainT,Interval,Compare,Alloc>::interval_type
 enclosure(const interval_base_set<SubType,DomainT,Interval,Compare,Alloc>& object)

Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -103,19 +103,19 @@
         typename KeyT,
         typename DataT,
         class Traits = itl::neutron_absorber,
- class Compare = std::less<KeyT>,
+ template<class>class Compare = std::less,
         template<class>class Alloc = std::allocator
>
- class map: private std::map<KeyT, DataT, Compare,
+ class map: private std::map<KeyT, DataT, Compare<KeyT>,
                                 Alloc<std::pair<const KeyT, DataT> > >
     {
     public:
         typedef Alloc<typename std::pair<const KeyT, DataT> > allocator_type;
 
         typedef typename itl::map<KeyT, DataT, Traits, Compare, Alloc> type;
- typedef typename std::map<KeyT, DataT, Compare,
- allocator_type> base_type;
- typedef typename itl::set<KeyT,Compare,Alloc> set_type;
+ typedef typename std::map<KeyT, DataT, Compare<KeyT>,
+ allocator_type> base_type;
+ typedef typename itl::set<KeyT, Compare, Alloc > set_type;
 
         typedef itl::map<KeyT, DataT, itl::neutron_absorber, Compare, Alloc>
                                                                neutron_absorber_type;
@@ -129,7 +129,7 @@
         typedef DataT data_type;
         typedef DataT codomain_type;
         typedef std::pair<const KeyT, DataT> value_type;
- typedef Compare key_compare;
+ typedef Compare<KeyT> key_compare;
         typedef typename base_type::value_compare value_compare;
 
     public:
@@ -313,30 +313,30 @@
 
     /** Standard equality, which is lexicographical equality of the sets
         as sequences, that are given by their Compare order. */
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
     inline bool operator == (const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
                              const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
- typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
         return operator==((const base_type&)lhs, (const base_type&)rhs);
     }
 
     //JODO comment...
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
     inline bool is_element_equal(const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
                                  const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
- typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
         return operator==((const base_type&)lhs, (const base_type&)rhs);
     }
 
     /** Protonic equality is equality on all elements that do not carry a neutron as content. */
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
     inline bool is_protonic_equal (const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
                                    const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
         //JODO: Efficient implementation.
- typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
 
         itl::map<KeyT,DataT,Traits,Compare,Alloc> lhs0 = lhs;
         itl::map<KeyT,DataT,Traits,Compare,Alloc> rhs0 = rhs;
@@ -346,24 +346,24 @@
     }
 
     /** Strict weak less ordering which is given by the Compare order */
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
     inline bool operator < (const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
         const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
- typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
         return operator<((const base_type&)lhs, (const base_type&)rhs);
     }
 
     /** Partial ordering which is induced by Compare */
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
     inline bool operator <= (const itl::map<KeyT,DataT,Traits,Compare,Alloc>& lhs,
         const itl::map<KeyT,DataT,Traits,Compare,Alloc>& rhs)
     {
- typedef std::map<KeyT,DataT,Compare,Alloc<KeyT> > base_type;
+ typedef std::map<KeyT,DataT,Compare<KeyT>,Alloc<KeyT> > base_type;
         return operator<=((const base_type&)lhs, (const base_type&)rhs);
     }
 
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
         template <template<class>class Combinator>
     typename map<KeyT,DataT,Traits,Compare,Alloc>::iterator
         map<KeyT,DataT,Traits,Compare,Alloc>::add(const value_type& val)
@@ -398,7 +398,7 @@
         }
     }
 
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
     typename map<KeyT,DataT,Traits,Compare,Alloc>::size_type
         map<KeyT,DataT,Traits,Compare,Alloc>
         ::erase(const value_type& value_pair)
@@ -418,7 +418,7 @@
     }
 
 
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
     typename map<KeyT,DataT,Traits,Compare,Alloc>::iterator
         map<KeyT,DataT,Traits,Compare,Alloc>::subtract(const value_type& val)
     {
@@ -444,7 +444,7 @@
     }
 
 
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
     std::string map<KeyT,DataT,Traits,Compare,Alloc>::as_string()const
     {
         std::string repr;
@@ -460,21 +460,21 @@
         return repr;
     }
 
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
         template<class Predicate>
     map<KeyT,DataT,Traits,Compare,Alloc>& map<KeyT,DataT,Traits,Compare,Alloc>
         ::erase_if(const Predicate& pred)
     {
         iterator it = begin();
         while(it != end())
- if(pred(*it))
+ if(Predicate()(*it))
                 erase(it++);
             else ++it;
         return *this;
     }
 
 
- template <typename KeyT, typename DataT, class Traits, class Compare, template<class>class Alloc>
+ template <typename KeyT, typename DataT, class Traits, template<class>class Compare, template<class>class Alloc>
         template<class Predicate>
     map<KeyT,DataT,Traits,Compare,Alloc>& map<KeyT,DataT,Traits,Compare,Alloc>
         ::assign_if(const map<KeyT,DataT,Traits,Compare,Alloc>& src, const Predicate& pred)
@@ -482,14 +482,14 @@
         clear();
         const_iterator it = src.begin();
         while(it != src.end()) {
- if(pred(*it))
+ if(Predicate()(*it))
                 add(*it++);
         }
         return *this;
     }
     //-------------------------------------------------------------------------
     template <typename KeyT, typename DataT, class Traits,
- class Compare, template<class>class Alloc>
+ template<class>class Compare, template<class>class Alloc>
     map<KeyT,DataT,Traits,Compare,Alloc>&
         insert(map<KeyT,DataT,Traits,Compare,Alloc>& object,
                const map<KeyT,DataT,Traits,Compare,Alloc>& insertee)
@@ -503,7 +503,7 @@
     }
 
     template <typename KeyT, typename DataT, class Traits,
- class Compare, template<class>class Alloc>
+ template<class>class Compare, template<class>class Alloc>
     map<KeyT,DataT,Traits,Compare,Alloc>&
         erase(map<KeyT,DataT,Traits,Compare,Alloc>& object,
               const map<KeyT,DataT,Traits,Compare,Alloc>& erasee)

Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp (original)
+++ sandbox/itl/boost/itl/set.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -69,21 +69,21 @@
     template
     <
         typename KeyT,
- class Compare = std::less<KeyT>,
+ template<class>class Compare = std::less,
         template<class>class Alloc = std::allocator
>
- class set: private std::set<KeyT, Compare, Alloc<KeyT> >
+ class set: private std::set<KeyT, Compare<KeyT>, Alloc<KeyT> >
     {
     public:
- typedef typename itl::set<KeyT, Compare, Alloc > type;
- typedef typename std::set<KeyT, Compare, Alloc<KeyT> > base_type;
+ typedef typename itl::set<KeyT, Compare, Alloc > type;
+ typedef typename std::set<KeyT, Compare<KeyT>, Alloc<KeyT> > base_type;
 
     public:
         typedef KeyT key_type;
         typedef KeyT value_type;
         typedef KeyT data_type;
- typedef Compare key_compare;
- typedef Compare value_compare;
+ typedef Compare<KeyT> key_compare;
+ typedef Compare<KeyT> value_compare;
         typedef Alloc<KeyT> allocator_type;
 
     public:
@@ -100,8 +100,8 @@
 
     public:
         set(){}
- set(const Compare& comp):
- std::set<KeyT, Compare, Alloc<KeyT> >(comp){}
+ set(const Compare<KeyT>& comp):
+ std::set<KeyT, Compare<KeyT>, Alloc<KeyT> >(comp){}
 
         template <class InputIterator>
         set(InputIterator f, InputIterator l): std::set<InputIterator>(f,l) {}
@@ -213,47 +213,47 @@
 
     /** Standard equality, which is lexicographical equality of the sets
         as sequences, that are given by their Compare order. */
- template <typename KeyT, class Compare, template<class>class Alloc>
+ template <typename KeyT, template<class>class Compare, template<class>class Alloc>
     inline bool operator == (const itl::set<KeyT,Compare,Alloc>& lhs,
                              const itl::set<KeyT,Compare,Alloc>& rhs)
     {
- typedef std::set<KeyT,Compare,Alloc<KeyT> > base_type;
+ typedef std::set<KeyT,Compare<KeyT>,Alloc<KeyT> > base_type;
         return operator==((const base_type&)lhs, (const base_type&)rhs);
     }
 
     /** Element equality. Two sets are equal if they contain the same
         elements */
- template <typename KeyT, class Compare,
+ template <typename KeyT, template<class>class Compare,
                              template<class>class Alloc>
     inline bool is_element_equal(const itl::set<KeyT,Compare,Alloc>& lhs,
                                  const itl::set<KeyT,Compare,Alloc>& rhs)
     {
- typedef std::set<KeyT,Compare,Alloc<KeyT> > base_type;
+ typedef std::set<KeyT,Compare<KeyT>,Alloc<KeyT> > base_type;
         return operator==((const base_type&)lhs, (const base_type&)rhs);
     }
 
     /** Strict weak less ordering which is given by the Compare order */
- template <typename KeyT, class Compare,
+ template <typename KeyT, template<class>class Compare,
                              template<class>class Alloc>
     inline bool operator < (const itl::set<KeyT,Compare,Alloc>& lhs,
                             const itl::set<KeyT,Compare,Alloc>& rhs)
     {
- typedef std::set<KeyT,Compare,Alloc<KeyT> > base_type;
+ typedef std::set<KeyT,Compare<KeyT>,Alloc<KeyT> > base_type;
         return operator<((const base_type&)lhs, (const base_type&)rhs);
     }
 
     /** Partial ordering which is induced by Compare */
- template <typename KeyT, class Compare,
+ template <typename KeyT, template<class>class Compare,
                              template<class>class Alloc>
     inline bool operator <= (const itl::set<KeyT,Compare,Alloc>& lhs,
         const itl::set<KeyT,Compare,Alloc>& rhs)
     {
- typedef std::set<KeyT,Compare,Alloc<KeyT> > base_type;
+ typedef std::set<KeyT,Compare<KeyT>,Alloc<KeyT> > base_type;
         return operator<=((const base_type&)lhs, (const base_type&)rhs);
     }
 
 
- template <typename KeyT, class Compare,
+ template <typename KeyT, template<class>class Compare,
                              template<class>class Alloc>
     typename set<KeyT,Compare,Alloc>::iterator
         set<KeyT,Compare,Alloc>::subtract(const value_type& val)
@@ -266,7 +266,7 @@
     }
 
 
- template <typename KeyT, class Compare, template<class>class Alloc>
+ template <typename KeyT, template<class>class Compare, template<class>class Alloc>
     std::string set<KeyT,Compare,Alloc>::as_string(const char* sep)const
     {
         const_iterator it_ = begin();
@@ -281,8 +281,8 @@
     }
 
 
- template <typename KeyT, class Compare, template<class>class Alloc>
- template<class Predicate>
+ template <typename KeyT, template<class>class Compare, template<class>class Alloc>
+ template <class Predicate>
     set<KeyT,Compare,Alloc>& set<KeyT,Compare,Alloc>
         ::erase_if(const Predicate& pred)
     {
@@ -295,8 +295,8 @@
 
     }
 
- template <typename KeyT, class Compare, template<class>class Alloc>
- template<class Predicate>
+ template <typename KeyT, template<class>class Compare, template<class>class Alloc>
+ template <class Predicate>
     set<KeyT,Compare,Alloc>& set<KeyT,Compare,Alloc>
         ::assign_if(const set<KeyT,Compare,Alloc>& src, const Predicate& pred)
     {
@@ -311,7 +311,7 @@
 
     //-------------------------------------------------------------------------
     template <typename KeyT,
- class Compare, template<class>class Alloc>
+ template<class>class Compare, template<class>class Alloc>
     set<KeyT,Compare,Alloc>&
         insert( set<KeyT,Compare,Alloc>& object,
                const set<KeyT,Compare,Alloc>& insertee)
@@ -320,7 +320,7 @@
     }
 
     template <typename KeyT,
- class Compare, template<class>class Alloc>
+ template<class>class Compare, template<class>class Alloc>
     set<KeyT,Compare,Alloc>&
         erase( set<KeyT,Compare,Alloc>& object,
               const set<KeyT,Compare,Alloc>& erasee)

Modified: sandbox/itl/boost/itl_xt/episode_set.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/episode_set.hpp (original)
+++ sandbox/itl/boost/itl_xt/episode_set.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -67,11 +67,11 @@
     @author Joachim Faulhaber
 */
 template <class TimeT, class TypeDomain>
-class episode_set : public itl::set<typed_episode<TimeT, TypeDomain>*, Less_TypedEpisodeATP<typed_episode<TimeT, TypeDomain>*> >
+class episode_set : public itl::set<typed_episode<TimeT, TypeDomain>*, Less_TypedEpisodeATP>
 {
     // all elements must have the same type from TypeDomain
 public:
- typedef itl::set<typed_episode<TimeT, TypeDomain>*, Less_TypedEpisodeATP<typed_episode<TimeT, TypeDomain>*> > base_type;
+ typedef itl::set<typed_episode<TimeT, TypeDomain>*, Less_TypedEpisodeATP> base_type;
     typedef typename base_type::iterator iterator;
     typedef typename base_type::const_iterator const_iterator;
     

Modified: sandbox/itl/boost/itl_xt/mapgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/mapgentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/mapgentor.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -73,7 +73,7 @@
     }
 
     void setRangeOfSampleSize(int lwb, int upb)
- { m_sampleSizeRange = rightopen_interval(lwb,upb); }
+ { m_sampleSizeRange = interval<int>::rightopen(lwb,upb); }
     void setRangeOfSampleSize(const interval<int>& szRange)
     { BOOST_ASSERT(szRange.is_rightopen()); m_sampleSizeRange = szRange; }
 

Modified: sandbox/itl/boost/itl_xt/numbergentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/numbergentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/numbergentor.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -99,7 +99,7 @@
     }
 
     void setRange(interval<NumTV> rng) { m_valueRange = rng; }
- void setRange(NumTV lwb, NumTV upb) { m_valueRange = rightopen_interval(lwb,upb); }
+ void setRange(NumTV lwb, NumTV upb) { m_valueRange = interval<NumTV>::rightopen(lwb,upb); }
 
     void calibrate(const RandomGentorProfile<NumTV>& profile)
     {

Modified: sandbox/itl/boost/itl_xt/setgentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/setgentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/setgentor.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -64,7 +64,7 @@
     }
 
     void setRangeOfSampleSize(int lwb, int upb)
- { m_sampleSizeRange = rightopen_interval(lwb,upb); }
+ { m_sampleSizeRange = interval<int>::rightopen(lwb,upb); }
     void setRangeOfSampleSize(const interval<int>& szRange)
     { BOOST_ASSERT(szRange.is_rightopen()); m_sampleSizeRange = szRange; }
 

Modified: sandbox/itl/boost/itl_xt/tuple_computer.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/tuple_computer.hpp (original)
+++ sandbox/itl/boost/itl_xt/tuple_computer.hpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -43,7 +43,7 @@
     public:
         typedef var_tuple<VarCount> var_tuple_type;
         typedef var_tuple_order<var_tuple_type> tuple_order_type;
- typedef itl::set<var_tuple_type, var_tuple_order<var_tuple_type> > tuple_set_type;
+ typedef itl::set<var_tuple_type, var_tuple_order> tuple_set_type;
 
     public:
         virtual ~tuple_computer_interface(){};
@@ -102,7 +102,7 @@
         typedef var_tuple<VarCount> var_tuple_type;
         typedef var_tuple_order<var_tuple_type> tuple_order_type;
         /// Container type for the implementation
- typedef itl::map<var_tuple_type, CounterT, neutron_absorber, var_tuple_order<var_tuple_type> > ImplMapTD;
+ typedef itl::map<var_tuple_type, CounterT, neutron_absorber, var_tuple_order> ImplMapTD;
         /// iterator
         typedef typename ImplMapTD::iterator iterator;
         /// const_iterator
@@ -339,8 +339,7 @@
         typedef tuple_computer_base<VarCount, counter_type> base_type;
         typedef typename base_type::var_tuple_type var_tuple_type;
         typedef typename base_type::key_compare key_compare;
- typedef typename itl::set<var_tuple_type, var_tuple_order<var_tuple_type> >
- tuple_set_type;
+ typedef typename itl::set<var_tuple_type, var_tuple_order> tuple_set_type;
 
     public:
         // Default Ctor
@@ -392,7 +391,7 @@
         typedef tuple_computer_base<VarCount, counter_type> base_type;
         typedef typename base_type::var_tuple_type var_tuple_type;
         typedef typename base_type::key_compare key_compare;
- typedef itl::set<var_tuple_type, var_tuple_order<var_tuple_type> > tuple_set_type;
+ typedef itl::set<var_tuple_type, var_tuple_order> tuple_set_type;
         typedef typename base_type::counter_type::interval_type interval_type;
 
     private:

Modified: sandbox/itl/boost/validate/gentor/gentorprofile.h
==============================================================================
--- sandbox/itl/boost/validate/gentor/gentorprofile.h (original)
+++ sandbox/itl/boost/validate/gentor/gentorprofile.h 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -20,19 +20,19 @@
         GentorProfile();
 
         void set_range_int(int lwb, int upb)
- { _range_int = rightopen_interval(lwb, upb); }
+ { _range_int = interval<int>::rightopen(lwb, upb); }
         void set_range_double(double lwb, double upb)
- { _range_double = rightopen_interval(lwb, upb); }
+ { _range_double = interval<double>::rightopen(lwb, upb); }
         void set_range_ContainerSize(int lwb, int upb)
- { _range_ContainerSize = rightopen_interval(lwb, upb); }
+ { _range_ContainerSize = interval<int>::rightopen(lwb, upb); }
         void set_range_interval_int(int lwb, int upb)
- { _range_interval_int = rightopen_interval(lwb, upb); }
+ { _range_interval_int = interval<int>::rightopen(lwb, upb); }
         void set_range_interval_double(double lwb, double upb)
- { _range_interval_double = rightopen_interval(lwb, upb); }
+ { _range_interval_double = interval<double>::rightopen(lwb, upb); }
         void set_maxIntervalLength(int val)
         { _maxIntervalLength = val; }
         void set_range_element_ContainerSize(int lwb, int upb)
- { _range_element_ContainerSize = rightopen_interval(lwb, upb); }
+ { _range_element_ContainerSize = interval<int>::rightopen(lwb, upb); }
 
         interval<int> range_int() { return _range_int; }
         interval<double> range_double() { return _range_double; }

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -88,20 +88,20 @@
 
     party.add( // add and element
       make_pair(
- rightopen_interval<ptime>(
+ interval<ptime>::rightopen(
           time_from_string("2008-05-20 19:30"),
           time_from_string("2008-05-20 23:00")),
           mary_harry));
 
     party += // element addition can also be done via operator +=
       make_pair(
- rightopen_interval<ptime>(
+ interval<ptime>::rightopen(
           time_from_string("2008-05-20 20:10"),
           time_from_string("2008-05-21 00:00")),
           diana_susan);
     party +=
       make_pair(
- rightopen_interval<ptime>(
+ interval<ptime>::rightopen(
           time_from_string("2008-05-20 22:15"),
           time_from_string("2008-05-21 00:30")),
           peter);
@@ -113,7 +113,7 @@
     // like e.g. min, max etc. in their 'inplace' or op= incarnation
     tallest_guest.add(
       make_pair(
- rightopen_interval<ptime>(
+ interval<ptime>::rightopen(
           time_from_string("2008-05-20 19:30"),
           time_from_string("2008-05-20 23:00")),
           180),
@@ -122,7 +122,7 @@
 
     tallest_guest.add(
       make_pair(
- rightopen_interval<ptime>(
+ interval<ptime>::rightopen(
           time_from_string("2008-05-20 20:10"),
           time_from_string("2008-05-21 00:00")),
           170),
@@ -131,7 +131,7 @@
 
     tallest_guest.add(
       make_pair(
- rightopen_interval<ptime>(
+ interval<ptime>::rightopen(
           time_from_string("2008-05-20 22:15"),
           time_from_string("2008-05-21 00:30")),
           200),

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -30,12 +30,12 @@
 int main()
 {
     cout << ">> Interval Template Library: Sample interval.cpp <<\n";
- cout << "---------------------------------------------------\n";
+ cout << "----------------------------------------------------\n";
 
- interval<int> int_Itv = closed_interval(3,7);
- interval<double> sqrt_Itv = rightopen_interval(1/sqrt(2.0), sqrt(2.0));
- interval<string> city_Itv = leftopen_interval<string>("Barcelona", "Boston");
- interval<Time> time_Itv = open_interval(Time(monday,8,30), Time(monday,17,20));
+ interval<int> int_Itv = interval<int>::closed(3,7);
+ interval<double> sqrt_Itv = interval<double>::rightopen(1/sqrt(2.0), sqrt(2.0));
+ interval<string> city_Itv = interval<string>::leftopen("Barcelona", "Boston");
+ interval<Time> time_Itv = interval<Time>::open(Time(monday,8,30), Time(monday,17,20));
 
     cout << "Interval<int>: " << int_Itv.as_string() << endl;
     cout << "Interval<double>: " << sqrt_Itv.as_string() << " does "

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -32,10 +32,10 @@
 */
 void interval_container_basics()
 {
- interval<Time> night_and_day = rightopen_interval(Time(monday, 20,00), Time(tuesday, 20,00));
- interval<Time> day_and_night = rightopen_interval(Time(tuesday, 7,00), Time(wednesday, 7,00));
- interval<Time> next_morning = rightopen_interval(Time(wednesday, 7,00), Time(wednesday,10,00));
- interval<Time> next_evening = rightopen_interval(Time(wednesday,18,00), Time(wednesday,21,00));
+ interval<Time> night_and_day = interval<Time>::rightopen(Time(monday, 20,00), Time(tuesday, 20,00));
+ interval<Time> day_and_night = interval<Time>::rightopen(Time(tuesday, 7,00), Time(wednesday, 7,00));
+ interval<Time> next_morning = interval<Time>::rightopen(Time(wednesday, 7,00), Time(wednesday,10,00));
+ interval<Time> next_evening = interval<Time>::rightopen(Time(wednesday,18,00), Time(wednesday,21,00));
 
     // An interval set of type interval_set joins intervals that that overlap or touch each other.
     interval_set<Time> joinedTimes;

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -50,7 +50,7 @@
     week_iterator week_iter(cur_weekend_sat);
 
     for(; week_iter <= scope.last(); ++week_iter)
- weekends += rightopen_interval(*week_iter, *week_iter + days(2));
+ weekends += interval<date>::rightopen(*week_iter, *week_iter + days(2));
 
     weekends *= scope; // cut off the surplus
 
@@ -67,7 +67,7 @@
     date someday = from_string("2008-08-01");
     date thenday = someday + months(3);
 
- interval<date> scope = rightopen_interval(someday, thenday);
+ interval<date> scope = interval<date>::rightopen(someday, thenday);
 
     // ------------------------------------------------------------------------
     // (1) In a first step, the regular working times are computed for the
@@ -80,8 +80,8 @@
     worktime -= from_string("2008-10-03"); //german reunification ;)
 
     // company holidays (fictitious ;)
- worktime -= closed_interval(from_string("2008-08-18"),
- from_string("2008-08-22"));
+ worktime -= interval<date>::closed(from_string("2008-08-18"),
+ from_string("2008-08-22"));
 
     //-------------------------------------------------------------------------
     // (2) Now we calculate the individual worktimes for some employees

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -54,7 +54,7 @@
     month_iterator month_iter(frame_months_1st);
 
     for(; month_iter <= scope.last(); ++month_iter)
- month_grid += rightopen_interval(*month_iter, *month_iter + months(1));
+ month_grid += interval<date>::rightopen(*month_iter, *month_iter + months(1));
 
     month_grid *= scope; // cut off the surplus
 
@@ -72,7 +72,7 @@
     week_iterator week_iter(frame_weeks_1st);
 
     for(; week_iter <= scope.last(); ++week_iter)
- week_grid.insert(rightopen_interval(*week_iter, *week_iter + weeks(1)));
+ week_grid.insert(interval<date>::rightopen(*week_iter, *week_iter + weeks(1)));
 
     week_grid *= scope; // cut off the surplus
 
@@ -87,7 +87,7 @@
     date someday = day_clock::local_day();
     date thenday = someday + months(2);
 
- interval<date> itv = rightopen_interval(someday, thenday);
+ interval<date> itv = interval<date>::rightopen(someday, thenday);
 
     // Compute a month grid
     date_grid month_and_week_grid = month_grid(itv);

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -56,19 +56,19 @@
     OverlapCounterTD overlap_counter;
     interval<int> itv;
 
- itv = rightopen_interval(4,8);
+ itv = interval<int>::rightopen(4,8);
     cout << "-- adding " << itv.as_string() << " -----------------------------------------" << endl;
     overlap_counter += make_pair(itv, 1);
     print_overlaps(overlap_counter);
     cout << "-----------------------------------------------------------" << endl;
 
- itv = rightopen_interval(6,9);
+ itv = interval<int>::rightopen(6,9);
     cout << "-- adding " << itv.as_string() << " -----------------------------------------" << endl;
     overlap_counter += make_pair(itv, 1);
     print_overlaps(overlap_counter);
     cout << "-----------------------------------------------------------" << endl;
 
- itv = rightopen_interval(1,9);
+ itv = interval<int>::rightopen(1,9);
     cout << "-- adding " << itv.as_string() << " -----------------------------------------" << endl;
     overlap_counter += make_pair(itv, 1);
     print_overlaps(overlap_counter);

Modified: sandbox/itl/libs/itl/example/party/party.cpp
==============================================================================
--- sandbox/itl/libs/itl/example/party/party.cpp (original)
+++ sandbox/itl/libs/itl/example/party/party.cpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -79,9 +79,9 @@
 
     PartyAttendenceHistoryT party;
 
- party += make_pair( rightopen_interval<Time>(Time(19,30), Time(23,00)), mary_harry);
- party += make_pair( rightopen_interval<Time>(Time(20,10), Time(monday,0,0)), diana_susan);
- party += make_pair( rightopen_interval<Time>(Time(22,15), Time(monday,0,30)), peter);
+ party += make_pair( interval<Time>::rightopen(Time(19,30), Time(23,00)), mary_harry);
+ party += make_pair( interval<Time>::rightopen(Time(20,10), Time(monday,0,0)), diana_susan);
+ party += make_pair( interval<Time>::rightopen(Time(22,15), Time(monday,0,30)), peter);
 
     PartyAttendenceHistoryT::iterator it = party.begin();
     while(it != party.end())

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -77,18 +77,18 @@
 
     med_users.add( // add and element
       make_pair(
- closed_interval<date>(
+ interval<date>::closed(
           from_string("2008-01-01"), from_string("2008-12-31")), mary_harry));
 
     med_users += // element addition can also be done via operator +=
       make_pair(
- closed_interval<date>(
+ interval<date>::closed(
           from_string("2008-01-15"), from_string("2008-12-31")),
           chief_physician);
 
     med_users +=
       make_pair(
- closed_interval<date>(
+ interval<date>::closed(
           from_string("2008-02-01"), from_string("2008-10-15")),
           director_of_admin);
 
@@ -97,18 +97,18 @@
 
     admin_users += // element addition can also be done via operator +=
       make_pair(
- closed_interval<date>(
+ interval<date>::closed(
           from_string("2008-03-20"), from_string("2008-09-30")), diana_susan);
 
     admin_users +=
       make_pair(
- closed_interval<date>(
+ interval<date>::closed(
           from_string("2008-01-15"), from_string("2008-12-31")),
           chief_physician);
 
     admin_users +=
       make_pair(
- closed_interval<date>(
+ interval<date>::closed(
           from_string("2008-02-01"), from_string("2008-10-15")),
           director_of_admin);
 

Modified: sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_map_mixed/test_interval_map_mixed.cpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -131,9 +131,9 @@
     T v5 = make<T>(5);
 
 
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I4_5D = rightopen_interval(v4,v5);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I4_5D = interval<T>::rightopen(v4,v5);
 
     std::pair<interval<T>,U> I1_3D_1(I1_3D, u1);
     std::pair<interval<T>,U> I2_4D_1(I2_4D, u1);
@@ -159,9 +159,9 @@
     T v4 = make<T>(4);
     T v5 = make<T>(5);
 
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I4_5D = rightopen_interval(v4,v5);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I4_5D = interval<T>::rightopen(v4,v5);
 
     std::pair<interval<T>,U> I1_3D_1(I1_3D, u1);
     std::pair<interval<T>,U> I2_4D_1(I2_4D, u1);
@@ -189,9 +189,9 @@
     T v4 = make<T>(4);
     T v5 = make<T>(5);
 
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I4_5D = rightopen_interval(v4,v5);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I4_5D = interval<T>::rightopen(v4,v5);
 
     std::pair<interval<T>,U> I1_3D_1(I1_3D, u1);
     std::pair<interval<T>,U> I2_4D_1(I2_4D, u1);
@@ -227,9 +227,9 @@
     T v4 = make<T>(4);
     T v5 = make<T>(5);
 
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I4_5D = rightopen_interval(v4,v5);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I4_5D = interval<T>::rightopen(v4,v5);
 
     std::pair<interval<T>,U> I1_3D_1(I1_3D, u1);
     std::pair<interval<T>,U> I2_4D_1(I2_4D, u1);
@@ -273,13 +273,13 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_4D = rightopen_interval(v0,v4);
- interval<T> I2_6D = rightopen_interval(v2,v6);
- interval<T> I3_6D = rightopen_interval(v3,v6);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I7_8D = rightopen_interval(v7,v8);
- interval<T> I8_9D = rightopen_interval(v8,v9);
- interval<T> I8_9I = closed_interval(v8,v9);
+ interval<T> I0_4D = interval<T>::rightopen(v0,v4);
+ interval<T> I2_6D = interval<T>::rightopen(v2,v6);
+ interval<T> I3_6D = interval<T>::rightopen(v3,v6);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I7_8D = interval<T>::rightopen(v7,v8);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
+ interval<T> I8_9I = interval<T>::closed(v8,v9);
 
     std::pair<interval<T>,U> I0_4D_1(I0_4D, u1);
     std::pair<interval<T>,U> I2_6D_1(I2_6D, u1);
@@ -359,13 +359,13 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_4D = rightopen_interval(v0,v4);
- interval<T> I2_6D = rightopen_interval(v2,v6);
- interval<T> I3_6D = rightopen_interval(v3,v6);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I7_8D = rightopen_interval(v7,v8);
- interval<T> I8_9D = rightopen_interval(v8,v9);
- interval<T> I8_9I = closed_interval(v8,v9);
+ interval<T> I0_4D = interval<T>::rightopen(v0,v4);
+ interval<T> I2_6D = interval<T>::rightopen(v2,v6);
+ interval<T> I3_6D = interval<T>::rightopen(v3,v6);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I7_8D = interval<T>::rightopen(v7,v8);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
+ interval<T> I8_9I = interval<T>::closed(v8,v9);
 
     std::pair<interval<T>,U> I0_4D_1(I0_4D, u1);
     std::pair<interval<T>,U> I2_6D_1(I2_6D, u1);
@@ -447,13 +447,13 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_4D = rightopen_interval(v0,v4);
- interval<T> I2_6D = rightopen_interval(v2,v6);
- interval<T> I3_6D = rightopen_interval(v3,v6);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I7_8D = rightopen_interval(v7,v8);
- interval<T> I8_9D = rightopen_interval(v8,v9);
- interval<T> I8_9I = closed_interval(v8,v9);
+ interval<T> I0_4D = interval<T>::rightopen(v0,v4);
+ interval<T> I2_6D = interval<T>::rightopen(v2,v6);
+ interval<T> I3_6D = interval<T>::rightopen(v3,v6);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I7_8D = interval<T>::rightopen(v7,v8);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
+ interval<T> I8_9I = interval<T>::closed(v8,v9);
 
     std::pair<interval<T>,U> I0_4D_1(I0_4D, u1);
     std::pair<interval<T>,U> I2_6D_1(I2_6D, u1);
@@ -533,13 +533,13 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_4D = rightopen_interval(v0,v4);
- interval<T> I2_6D = rightopen_interval(v2,v6);
- interval<T> I3_6D = rightopen_interval(v3,v6);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I7_8D = rightopen_interval(v7,v8);
- interval<T> I8_9D = rightopen_interval(v8,v9);
- interval<T> I8_9I = closed_interval(v8,v9);
+ interval<T> I0_4D = interval<T>::rightopen(v0,v4);
+ interval<T> I2_6D = interval<T>::rightopen(v2,v6);
+ interval<T> I3_6D = interval<T>::rightopen(v3,v6);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I7_8D = interval<T>::rightopen(v7,v8);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
+ interval<T> I8_9I = interval<T>::closed(v8,v9);
 
     std::pair<interval<T>,U> I0_4D_1(I0_4D, u1);
     std::pair<interval<T>,U> I2_6D_1(I2_6D, u1);
@@ -626,13 +626,13 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_4D = rightopen_interval(v0,v4);
- interval<T> I2_6D = rightopen_interval(v2,v6);
- interval<T> I3_6D = rightopen_interval(v3,v6);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I7_8D = rightopen_interval(v7,v8);
- interval<T> I8_9D = rightopen_interval(v8,v9);
- interval<T> I8_9I = closed_interval(v8,v9);
+ interval<T> I0_4D = interval<T>::rightopen(v0,v4);
+ interval<T> I2_6D = interval<T>::rightopen(v2,v6);
+ interval<T> I3_6D = interval<T>::rightopen(v3,v6);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I7_8D = interval<T>::rightopen(v7,v8);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
+ interval<T> I8_9I = interval<T>::closed(v8,v9);
 
     std::pair<interval<T>,U> I0_4D_1(I0_4D, u1);
     std::pair<interval<T>,U> I2_6D_1(I2_6D, u1);
@@ -729,14 +729,14 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I1_8D = rightopen_interval(v1,v8);
- interval<T> I2_7D = rightopen_interval(v2,v7);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I6_7D = rightopen_interval(v6,v7);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I1_8D = interval<T>::rightopen(v1,v8);
+ interval<T> I2_7D = interval<T>::rightopen(v2,v7);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I6_7D = interval<T>::rightopen(v6,v7);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
 
     std::pair<interval<T>,U> I0_3D_1(I0_3D, u1);
     std::pair<interval<T>,U> I1_3D_1(I1_3D, u1);
@@ -796,11 +796,11 @@
     BOOST_CHECK_EQUAL( split_AB, split_ab );
 
     split_AB = split_A;
- //(split_AB *= base_pair<T,U>(v1,u1)) += make_pair(open_interval<T>(v1,v7), u1); //JODO
+ //(split_AB *= base_pair<T,U>(v1,u1)) += make_pair(interval<T>::open(v1,v7), u1); //JODO
     split_AB *= base_pair<T,U>(v1,u1);
- split_AB += make_pair(open_interval<T>(v1,v7), u2);
+ split_AB += make_pair(interval<T>::open(v1,v7), u2);
     split_ab2.clear();
- split_ab2 += make_pair(rightopen_interval<T>(v1,v7), u2);
+ split_ab2 += make_pair(interval<T>::rightopen(v1,v7), u2);
 
     BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), true );
 }
@@ -828,14 +828,14 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I1_8D = rightopen_interval(v1,v8);
- interval<T> I2_7D = rightopen_interval(v2,v7);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I6_7D = rightopen_interval(v6,v7);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I1_8D = interval<T>::rightopen(v1,v8);
+ interval<T> I2_7D = interval<T>::rightopen(v2,v7);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I6_7D = interval<T>::rightopen(v6,v7);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
 
     std::pair<interval<T>,U> I0_3D_1(I0_3D, u1);
     std::pair<interval<T>,U> I1_3D_1(I1_3D, u1);
@@ -894,11 +894,11 @@
     BOOST_CHECK_EQUAL( split_AB, split_ab );
 
     split_AB = split_A;
- //(split_AB *= base_pair<T,U>(v1,u1)) += make_pair(open_interval<T>(v1,v7), u1); //JODO
+ //(split_AB *= base_pair<T,U>(v1,u1)) += make_pair(interval<T>::open(v1,v7), u1); //JODO
     split_AB *= interval<T>(v1);
- split_AB += make_pair(open_interval<T>(v1,v7), u1);
+ split_AB += make_pair(interval<T>::open(v1,v7), u1);
     split_ab2.clear();
- split_ab2 += make_pair(rightopen_interval<T>(v1,v7), u1);
+ split_ab2 += make_pair(interval<T>::rightopen(v1,v7), u1);
 
     BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), true );
 }
@@ -926,14 +926,14 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_2D = rightopen_interval(v1,v2);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I5_8D = rightopen_interval(v5,v8);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_2D = interval<T>::rightopen(v1,v2);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I5_8D = interval<T>::rightopen(v5,v8);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
 
     std::pair<interval<T>,U> I0_3D_1(I0_3D, u1);
     std::pair<interval<T>,U> I1_2D_1(I1_2D, u1);
@@ -1007,14 +1007,14 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_2D = rightopen_interval(v1,v2);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I5_8D = rightopen_interval(v5,v8);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_2D = interval<T>::rightopen(v1,v2);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I5_8D = interval<T>::rightopen(v5,v8);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
 
     std::pair<interval<T>,U> I0_3D_1(I0_3D, u1);
     std::pair<interval<T>,U> I1_2D_1(I1_2D, u1);
@@ -1085,12 +1085,12 @@
 
 
 
- interval<T> I0_2D = rightopen_interval(v0,v2);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I3_4D = rightopen_interval(v3,v4);
- interval<T> I4_4I = closed_interval(v4,v4);
- interval<T> C4_6D = open_interval(v4,v6);
- interval<T> I6_6I = closed_interval(v6,v6);
+ interval<T> I0_2D = interval<T>::rightopen(v0,v2);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I3_4D = interval<T>::rightopen(v3,v4);
+ interval<T> I4_4I = interval<T>::closed(v4,v4);
+ interval<T> C4_6D = interval<T>::open(v4,v6);
+ interval<T> I6_6I = interval<T>::closed(v6,v6);
 
     std::pair<interval<T>,U> I0_2D_1(I0_2D, u1);
     std::pair<interval<T>,U> I2_3D_1(I2_3D, u1);
@@ -1146,12 +1146,12 @@
 
 
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I3_4D = rightopen_interval(v3,v4);
- interval<T> I4_4I = closed_interval(v4,v4);
- interval<T> C4_6D = open_interval(v4,v6);
- interval<T> I6_6I = closed_interval(v6,v6);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I3_4D = interval<T>::rightopen(v3,v4);
+ interval<T> I4_4I = interval<T>::closed(v4,v4);
+ interval<T> C4_6D = interval<T>::open(v4,v6);
+ interval<T> I6_6I = interval<T>::closed(v6,v6);
 
     std::pair<interval<T>,U> I0_3D_1(I0_3D, u1);
     std::pair<interval<T>,U> I2_3D_1(I2_3D, u1);

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -12,8 +12,8 @@
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -159,8 +159,8 @@
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -220,8 +220,8 @@
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -236,12 +236,12 @@
     U u1 = make<U>(1);
     interval<T> I5_6I(v5,v6);
     interval<T> I5_9I(v5,v9);
- interval<T> I0_9I = closed_interval(v0, v9);
+ interval<T> I0_9I = interval<T>::closed(v0, v9);
     typename IntervalMapT::base_pair_type v0_u1 = make_pair(v0, u1);
     typename IntervalMapT::base_pair_type v9_u1 = make_pair(v9, u1);
     typename IntervalMapT::value_type I5_6I_u1 = make_pair(I5_6I, u1);
     typename IntervalMapT::value_type I5_9I_u1 = make_pair(I5_9I, u1);
- typename IntervalMapT::value_type I0_9I_u1 = make_pair(closed_interval(v0, v9), u1);
+ typename IntervalMapT::value_type I0_9I_u1 = make_pair(interval<T>::closed(v0, v9), u1);
 
     BOOST_CHECK_EQUAL( IntervalMapT(I5_6I_u1).add(v0_u1).add(v9_u1),
                        IntervalMapT().add(v9_u1).add(I5_6I_u1).add(v0_u1) );
@@ -273,8 +273,8 @@
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -304,8 +304,8 @@
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -339,10 +339,10 @@
     IntervalMapT is_123_5;
     is_123_5 = is_1_3_5;
     //OPROM: open problem: Ambiguity resolving value_type and base_value_type for overloaded o= operators.
- //is_123_5 += make_pair(open_interval<T>(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
- //is_123_5 += make_pair<interval<T>, U>(open_interval<T>(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
+ //is_123_5 += make_pair(interval<T>::open(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
+ //is_123_5 += make_pair<interval<T>, U>(interval<T>::open(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
     //USASO: unsatisfctory solution 1: explicit IntervalMapT::value_type instead of make_pair
- is_123_5 += typename IntervalMapT::value_type(open_interval<T>(v1,v3),u1);
+ is_123_5 += typename IntervalMapT::value_type(interval<T>::open(v1,v3),u1);
     //USASO: unsatisfctory solution 2: not implementing base_value_type version of o=
 
     BOOST_CHECK_EQUAL( is_123_5.cardinality(), std::numeric_limits<size_T>::infinity() );
@@ -353,8 +353,8 @@
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -368,9 +368,9 @@
     T v2 = make<T>(2);
     T v4 = make<T>(4);
     U u1 = make<U>(1);
- interval<T> I0_4I = closed_interval(v0,v4);
- interval<T> C0_2D = open_interval(v0,v2);
- interval<T> C2_4D = open_interval(v2,v4);
+ interval<T> I0_4I = interval<T>::closed(v0,v4);
+ interval<T> C0_2D = interval<T>::open(v0,v2);
+ interval<T> C2_4D = interval<T>::open(v2,v4);
     typename IntervalMapT::value_type I0_4I_u1(I0_4I,u1);
     typename IntervalMapT::value_type C0_2D_u1(C0_2D,u1);
     typename IntervalMapT::value_type C2_4D_u1(C2_4D,u1);
@@ -404,8 +404,8 @@
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -438,7 +438,7 @@
     IntervalMapT im0 = im;
 
     im.clear();
- IntervalMapT im2(typename IntervalMapT::value_type(closed_interval(v5,v8),u1));
+ IntervalMapT im2(typename IntervalMapT::value_type(interval<T>::closed(v5,v8),u1));
     im2.add(v9_u1).add(v11_u1);
     im += im2;
     BOOST_CHECK_EQUAL( im.contains(im2), true );
@@ -446,8 +446,8 @@
 
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -461,10 +461,10 @@
     T v7 = make<T>(7);
     T v8 = make<T>(8);
     U u1 = make<U>(1);
- typename IntervalMapT::interval_type I3_5I(closed_interval(v3,v5));
- typename IntervalMapT::value_type I0_1I_u1(closed_interval(v0,v1),u1);
- typename IntervalMapT::value_type I3_5I_u1(closed_interval(v3,v5),u1);
- typename IntervalMapT::value_type I7_8I_u1(closed_interval(v7,v8),u1);
+ typename IntervalMapT::interval_type I3_5I(interval<T>::closed(v3,v5));
+ typename IntervalMapT::value_type I0_1I_u1(interval<T>::closed(v0,v1),u1);
+ typename IntervalMapT::value_type I3_5I_u1(interval<T>::closed(v3,v5),u1);
+ typename IntervalMapT::value_type I7_8I_u1(interval<T>::closed(v7,v8),u1);
     
     IntervalMapT left, left2, right, all, section, complement;
     left.add(I0_1I_u1).add(I3_5I_u1);
@@ -508,8 +508,8 @@
 // Test for nontrivial intersection of interval maps with intervals and values
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -530,16 +530,16 @@
 
     U u1 = make<U>(1);
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I1_4D = rightopen_interval(v1,v4);
- interval<T> I1_8D = rightopen_interval(v1,v8);
- interval<T> I2_7D = rightopen_interval(v2,v7);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I5_8D = rightopen_interval(v5,v8);
- interval<T> I6_7D = rightopen_interval(v6,v7);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I1_4D = interval<T>::rightopen(v1,v4);
+ interval<T> I1_8D = interval<T>::rightopen(v1,v8);
+ interval<T> I2_7D = interval<T>::rightopen(v2,v7);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I5_8D = interval<T>::rightopen(v5,v8);
+ interval<T> I6_7D = interval<T>::rightopen(v6,v7);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
 
     typename IntervalMapT::value_type I0_3D_1(I0_3D, u1);
     typename IntervalMapT::value_type I6_9D_1(I6_9D, u1);
@@ -619,8 +619,8 @@
 // Test for nontrivial erasure of interval maps with intervals and interval sets
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -641,22 +641,22 @@
 
     U u1 = make<U>(1);
 
- interval<T> I0_1D = rightopen_interval(v0,v1);
- interval<T> I0_2D = rightopen_interval(v0,v2);
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I1_4D = rightopen_interval(v1,v4);
- interval<T> I1_8D = rightopen_interval(v1,v8);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I2_7D = rightopen_interval(v2,v7);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I5_8D = rightopen_interval(v5,v8);
- interval<T> I6_7D = rightopen_interval(v6,v7);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
- interval<T> I7_9D = rightopen_interval(v7,v9);
- interval<T> I8_9D = rightopen_interval(v8,v9);
+ interval<T> I0_1D = interval<T>::rightopen(v0,v1);
+ interval<T> I0_2D = interval<T>::rightopen(v0,v2);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I1_4D = interval<T>::rightopen(v1,v4);
+ interval<T> I1_8D = interval<T>::rightopen(v1,v8);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I2_7D = interval<T>::rightopen(v2,v7);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I5_8D = interval<T>::rightopen(v5,v8);
+ interval<T> I6_7D = interval<T>::rightopen(v6,v7);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
+ interval<T> I7_9D = interval<T>::rightopen(v7,v9);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
 
     typename IntervalMapT::value_type I0_1D_1(I0_1D, u1);
     typename IntervalMapT::value_type I0_3D_1(I0_3D, u1);
@@ -734,8 +734,8 @@
 // Test first_collision
 template <template<class T, class U,
                    class Traits = neutron_absorber,
- template<class>class = interval,
- class = std::less<T>,
+ template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                    template<class>class = std::allocator
>class IntervalMap,
           class T, class U>
@@ -755,12 +755,12 @@
 
     U u1 = make<U>(1);
 
- interval<T> I0_1D = rightopen_interval(v0,v1);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I3_6D = rightopen_interval(v3,v6);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I8_9D = rightopen_interval(v8,v9);
+ interval<T> I0_1D = interval<T>::rightopen(v0,v1);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I3_6D = interval<T>::rightopen(v3,v6);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
 
     typename IntervalMapT::value_type I0_1D_1(I0_1D, u1);
     typename IntervalMapT::value_type I1_3D_1(I1_3D, u1);

Modified: sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_set_mixed/test_interval_set_mixed.cpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -139,9 +139,9 @@
     T v4 = make<T>(4);
     T v5 = make<T>(5);
 
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I4_5D = rightopen_interval(v4,v5);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I4_5D = interval<T>::rightopen(v4,v5);
 
     split_interval_set<T> split_set;
     split_set.add(I1_3D).add(I2_4D).add(I4_5D);
@@ -170,9 +170,9 @@
     T v4 = make<T>(4);
     T v5 = make<T>(5);
 
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I4_5D = rightopen_interval(v4,v5);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I4_5D = interval<T>::rightopen(v4,v5);
 
     split_interval_set<T> split_set;
     split_set.add(I1_3D).add(I2_4D).add(I4_5D);
@@ -205,9 +205,9 @@
     T v4 = make<T>(4);
     T v5 = make<T>(5);
 
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I4_5D = rightopen_interval(v4,v5);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I4_5D = interval<T>::rightopen(v4,v5);
 
     interval_set<T> join_set;
     join_set.add(I1_3D).add(I2_4D).add(I4_5D);
@@ -246,9 +246,9 @@
     T v4 = make<T>(4);
     T v5 = make<T>(5);
 
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I4_5D = rightopen_interval(v4,v5);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I4_5D = interval<T>::rightopen(v4,v5);
 
     split_interval_set<T> split_set;
     split_set.add(I1_3D).add(I2_4D);
@@ -297,13 +297,13 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_4D = rightopen_interval(v0,v4);
- interval<T> I2_6D = rightopen_interval(v2,v6);
- interval<T> I3_6D = rightopen_interval(v3,v6);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I7_8D = rightopen_interval(v7,v8);
- interval<T> I8_9D = rightopen_interval(v8,v9);
- interval<T> I8_9I = closed_interval(v8,v9);
+ interval<T> I0_4D = interval<T>::rightopen(v0,v4);
+ interval<T> I2_6D = interval<T>::rightopen(v2,v6);
+ interval<T> I3_6D = interval<T>::rightopen(v3,v6);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I7_8D = interval<T>::rightopen(v7,v8);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
+ interval<T> I8_9I = interval<T>::closed(v8,v9);
 
     //JODO INSIGHT: With respect to subtraction all interval_sets are working equivalently:
     //Never does a subtract operation introduce or preserve interval borders within
@@ -408,13 +408,13 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_4D = rightopen_interval(v0,v4);
- interval<T> I2_6D = rightopen_interval(v2,v6);
- interval<T> I3_6D = rightopen_interval(v3,v6);
- interval<T> I5_7D = rightopen_interval(v5,v7);
- interval<T> I7_8D = rightopen_interval(v7,v8);
- interval<T> I8_9D = rightopen_interval(v8,v9);
- interval<T> I8_9I = closed_interval(v8,v9);
+ interval<T> I0_4D = interval<T>::rightopen(v0,v4);
+ interval<T> I2_6D = interval<T>::rightopen(v2,v6);
+ interval<T> I3_6D = interval<T>::rightopen(v3,v6);
+ interval<T> I5_7D = interval<T>::rightopen(v5,v7);
+ interval<T> I7_8D = interval<T>::rightopen(v7,v8);
+ interval<T> I8_9D = interval<T>::rightopen(v8,v9);
+ interval<T> I8_9I = interval<T>::closed(v8,v9);
 
     //JODO INSIGHT: With respect to subtraction all interval_sets are working equivalently:
     //Never does a subtract operation introduce or preserve interval borders within
@@ -519,14 +519,14 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I1_8D = rightopen_interval(v1,v8);
- interval<T> I2_7D = rightopen_interval(v2,v7);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I6_7D = rightopen_interval(v6,v7);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I1_8D = interval<T>::rightopen(v1,v8);
+ interval<T> I2_7D = interval<T>::rightopen(v2,v7);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I6_7D = interval<T>::rightopen(v6,v7);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
 
     //--------------------------------------------------------------------------
     // split_interval_set
@@ -567,9 +567,9 @@
     BOOST_CHECK_EQUAL( split_AB, split_ab );
 
     split_AB = split_A;
- (split_AB *= v1) += open_interval<T>(v1,v7);
+ (split_AB *= v1) += interval<T>::open(v1,v7);
     split_ab2.clear();
- split_ab2 += rightopen_interval<T>(v1,v7);
+ split_ab2 += interval<T>::rightopen(v1,v7);
 
     BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), true );
 }
@@ -587,14 +587,14 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_2D = rightopen_interval(v1,v2);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I2_4D = rightopen_interval(v2,v4);
- interval<T> I5_8D = rightopen_interval(v5,v8);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_2D = interval<T>::rightopen(v1,v2);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I2_4D = interval<T>::rightopen(v2,v4);
+ interval<T> I5_8D = interval<T>::rightopen(v5,v8);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
 
     //--------------------------------------------------------------------------
     // split_interval_set
@@ -720,12 +720,12 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_2D = rightopen_interval(v0,v2);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I3_4D = rightopen_interval(v3,v4);
- interval<T> I4_4I = closed_interval(v4,v4);
- interval<T> C4_6D = open_interval(v4,v6);
- interval<T> I6_6I = closed_interval(v6,v6);
+ interval<T> I0_2D = interval<T>::rightopen(v0,v2);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I3_4D = interval<T>::rightopen(v3,v4);
+ interval<T> I4_4I = interval<T>::closed(v4,v4);
+ interval<T> C4_6D = interval<T>::open(v4,v6);
+ interval<T> I6_6I = interval<T>::closed(v6,v6);
 
     //--------------------------------------------------------------------------
     //split_A: [0 2) [4 4] [6 6]

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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -9,8 +9,8 @@
 #define __test_itl_interval_set_shared_h_JOFA_080920__
 
 
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -141,8 +141,8 @@
 
 
 
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -192,8 +192,8 @@
 }
 
 
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -205,7 +205,7 @@
     T v9 = make<T>(9);
     interval<T> I5_6I(v5,v6);
     interval<T> I5_9I(v5,v9);
- interval<T> I0_9I = closed_interval(v0, v9);
+ interval<T> I0_9I = interval<T>::closed(v0, v9);
 
     BOOST_CHECK_EQUAL( IntervalSet<T>(I5_6I).add(v0).add(v9),
                        IntervalSet<T>().insert(v9).insert(I5_6I).insert(v0) );
@@ -234,8 +234,8 @@
 }
 
 
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -260,8 +260,8 @@
 }
 
 
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -293,7 +293,7 @@
 
     IntervalSet<T> is_123_5;
     is_123_5 = is_1_3_5;
- is_123_5 += open_interval<T>(v1,v3);
+ is_123_5 += interval<T>::open(v1,v3);
 
     BOOST_CHECK_EQUAL( is_123_5.cardinality(), std::numeric_limits<size_T>::infinity() );
     BOOST_CHECK_EQUAL( is_123_5.size(), std::numeric_limits<size_T>::infinity() );
@@ -301,8 +301,8 @@
 }
 
 
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -314,9 +314,9 @@
     T v0 = make<T>(0);
     T v2 = make<T>(2);
     T v4 = make<T>(4);
- interval<T> I0_4I = closed_interval(v0,v4);
- interval<T> C0_2D = open_interval(v0,v2);
- interval<T> C2_4D = open_interval(v2,v4);
+ interval<T> I0_4I = interval<T>::closed(v0,v4);
+ interval<T> C0_2D = interval<T>::open(v0,v2);
+ interval<T> C2_4D = interval<T>::open(v2,v4);
     // {[0 4]}
     // - { (0,2) (2,4) }
     // = {[0] [2] [4]}
@@ -345,8 +345,8 @@
 }
 
 
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -370,21 +370,21 @@
 
     IntervalSet<T> is0 = is;
 
- IntervalSet<T> is2(closed_interval(v5,v8));
+ IntervalSet<T> is2(interval<T>::closed(v5,v8));
     is2.add(v9).add(v11);
     is += is2;
     BOOST_CHECK_EQUAL( is.contains(is2), true );
 
     is = is0;
- IntervalSet<T> is3(closed_interval(v5,v8));
+ IntervalSet<T> is3(interval<T>::closed(v5,v8));
     is3.insert(v9).insert(v11);
     is += is3;
     BOOST_CHECK_EQUAL( is.contains(is3), true );
 }
 
 
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -397,8 +397,8 @@
     T v7 = make<T>(7);
     T v8 = make<T>(8);
     IntervalSet<T> left, left2, right, all, all2, section, complement, naught;
- left.add(closed_interval(v0,v1)).add(closed_interval(v3,v5));
- (right += closed_interval(v3,v5)) += closed_interval(v7,v8);
+ left.add(interval<T>::closed(v0,v1)).add(interval<T>::closed(v3,v5));
+ (right += interval<T>::closed(v3,v5)) += interval<T>::closed(v7,v8);
 
     BOOST_CHECK_EQUAL( is_disjoint(left, right), false );
 
@@ -426,8 +426,8 @@
 
 
 // Test for nontrivial intersection of interval sets with intervals and values
-template <template<class T, template<class>class = interval,
- class = std::less<T>,
+template <template<class T, template<class,template<class>class>class = interval,
+ template<class>class = std::less,
                             template<class>class = std::allocator
>class IntervalSet,
           class T>
@@ -444,14 +444,14 @@
     T v8 = make<T>(8);
     T v9 = make<T>(9);
 
- interval<T> I0_3D = rightopen_interval(v0,v3);
- interval<T> I1_3D = rightopen_interval(v1,v3);
- interval<T> I1_8D = rightopen_interval(v1,v8);
- interval<T> I2_7D = rightopen_interval(v2,v7);
- interval<T> I2_3D = rightopen_interval(v2,v3);
- interval<T> I6_7D = rightopen_interval(v6,v7);
- interval<T> I6_8D = rightopen_interval(v6,v8);
- interval<T> I6_9D = rightopen_interval(v6,v9);
+ interval<T> I0_3D = interval<T>::rightopen(v0,v3);
+ interval<T> I1_3D = interval<T>::rightopen(v1,v3);
+ interval<T> I1_8D = interval<T>::rightopen(v1,v8);
+ interval<T> I2_7D = interval<T>::rightopen(v2,v7);
+ interval<T> I2_3D = interval<T>::rightopen(v2,v3);
+ interval<T> I6_7D = interval<T>::rightopen(v6,v7);
+ interval<T> I6_8D = interval<T>::rightopen(v6,v8);
+ interval<T> I6_9D = interval<T>::rightopen(v6,v9);
 
     //--------------------------------------------------------------------------
     // IntervalSet
@@ -492,9 +492,9 @@
     BOOST_CHECK_EQUAL( split_AB, split_ab );
 
     split_AB = split_A;
- (split_AB *= v1) += open_interval<T>(v1,v7);
+ (split_AB *= v1) += interval<T>::open(v1,v7);
     split_ab2.clear();
- split_ab2 += rightopen_interval<T>(v1,v7);
+ split_ab2 += interval<T>::rightopen(v1,v7);
 
     BOOST_CHECK_EQUAL( is_element_equal(split_AB, split_ab2), 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 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -78,39 +78,39 @@
     BOOST_CHECK_EQUAL( I4_4I, k_4_4 );
 
     T v2 = make<T>(2);
- BOOST_CHECK_EQUAL( closed_interval<T>(v2, v4), interval<T>(v2, v4) );
- BOOST_CHECK_EQUAL( closed_interval<T>(v2, v4), interval<T>(v2, v4, interval<T>::CLOSED) );
- BOOST_CHECK_EQUAL( rightopen_interval<T>(v2, v4), interval<T>(v2, v4, interval<T>::RIGHT_OPEN) );
- BOOST_CHECK_EQUAL( leftopen_interval<T>(v2, v4), interval<T>(v2, v4, interval<T>::LEFT_OPEN) );
- BOOST_CHECK_EQUAL( open_interval<T>(v2, v4), interval<T>(v2, v4, interval<T>::OPEN) );
-
- BOOST_CHECK_EQUAL( closed_interval<T>(v2, v4).lower(), v2 );
- BOOST_CHECK_EQUAL( closed_interval<T>(v2, v4).upper(), v4 );
- BOOST_CHECK_EQUAL( closed_interval<T>(v2, v4).boundtypes(), interval<T>::CLOSED );
- BOOST_CHECK_EQUAL( closed_interval<T>(v2, v4).is_closed(), true );
- BOOST_CHECK_EQUAL( closed_interval<T>(v2, v4).leftbound_closed(), true );
- BOOST_CHECK_EQUAL( closed_interval<T>(v2, v4).rightbound_closed(), true );
-
- BOOST_CHECK_EQUAL( rightopen_interval<T>(v2, v4).lower(), v2 );
- BOOST_CHECK_EQUAL( rightopen_interval<T>(v2, v4).upper(), v4 );
- BOOST_CHECK_EQUAL( rightopen_interval<T>(v2, v4).boundtypes(), interval<T>::RIGHT_OPEN );
- BOOST_CHECK_EQUAL( rightopen_interval<T>(v2, v4).is_rightopen(), true );
- BOOST_CHECK_EQUAL( rightopen_interval<T>(v2, v4).leftbound_closed(), true );
- BOOST_CHECK_EQUAL( rightopen_interval<T>(v2, v4).rightbound_open(), true );
-
- BOOST_CHECK_EQUAL( leftopen_interval<T>(v2, v4).lower(), v2 );
- BOOST_CHECK_EQUAL( leftopen_interval<T>(v2, v4).upper(), v4 );
- BOOST_CHECK_EQUAL( leftopen_interval<T>(v2, v4).boundtypes(), interval<T>::LEFT_OPEN );
- BOOST_CHECK_EQUAL( leftopen_interval<T>(v2, v4).is_leftopen(), true );
- BOOST_CHECK_EQUAL( leftopen_interval<T>(v2, v4).leftbound_open(), true );
- BOOST_CHECK_EQUAL( leftopen_interval<T>(v2, v4).rightbound_closed(), true );
-
- BOOST_CHECK_EQUAL( open_interval<T>(v2, v4).lower(), v2 );
- BOOST_CHECK_EQUAL( open_interval<T>(v2, v4).upper(), v4 );
- BOOST_CHECK_EQUAL( open_interval<T>(v2, v4).boundtypes(), interval<T>::OPEN );
- BOOST_CHECK_EQUAL( open_interval<T>(v2, v4).is_open(), true );
- BOOST_CHECK_EQUAL( open_interval<T>(v2, v4).leftbound_open(), true );
- BOOST_CHECK_EQUAL( open_interval<T>(v2, v4).rightbound_open(), true );
+ BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4), interval<T>(v2, v4) );
+ BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4), interval<T>(v2, v4, interval<T>::CLOSED) );
+ BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4), interval<T>(v2, v4, interval<T>::RIGHT_OPEN) );
+ BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4), interval<T>(v2, v4, interval<T>::LEFT_OPEN) );
+ BOOST_CHECK_EQUAL( interval<T>::open(v2, v4), interval<T>(v2, v4, interval<T>::OPEN) );
+
+ 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).boundtypes(), interval<T>::CLOSED );
+ BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).is_closed(), true );
+ BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).leftbound_closed(), true );
+ BOOST_CHECK_EQUAL( interval<T>::closed(v2, v4).rightbound_closed(), 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).boundtypes(), interval<T>::RIGHT_OPEN );
+ BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).is_rightopen(), true );
+ BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).leftbound_closed(), true );
+ BOOST_CHECK_EQUAL( interval<T>::rightopen(v2, v4).rightbound_open(), 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).boundtypes(), interval<T>::LEFT_OPEN );
+ BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).is_leftopen(), true );
+ BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).leftbound_open(), true );
+ BOOST_CHECK_EQUAL( interval<T>::leftopen(v2, v4).rightbound_closed(), 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).boundtypes(), interval<T>::OPEN );
+ BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).is_open(), true );
+ BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).leftbound_open(), true );
+ BOOST_CHECK_EQUAL( interval<T>::open(v2, v4).rightbound_open(), true );
 }
 
 BOOST_AUTO_TEST_CASE_TEMPLATE(test_itl_interval_ctor_4_integral_types, T, integral_types)
@@ -142,10 +142,10 @@
     //I: (I)nside = closed bound
     //C: left open bound
     //D: right open bound
- interval<T> I3_7I = closed_interval<T>(v3,v7);
- interval<T> I3__8D = rightopen_interval<T>(v3,v8);
- interval<T> C2__7I = leftopen_interval<T>(v2,v7);
- interval<T> C2___8D = open_interval<T>(v2,v8);
+ 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 );
@@ -170,10 +170,10 @@
 
     //I: (I)nside = closed bound
     //O: (O)utside = open bound
- interval<T> I3_7I = closed_interval<T>(v3,v7);
- interval<T> I3_7D = rightopen_interval<T>(v3,v7);
- interval<T> C3_7I = leftopen_interval<T>(v3,v7);
- interval<T> C3_7D = open_interval<T>(v3,v7);
+ 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 );
@@ -196,12 +196,12 @@
     T v7 = make<T>(7);
     T v9 = make<T>(9);
 
- interval<T> I3_7D = rightopen_interval<T>(v3,v7);
- interval<T> I7_9I = closed_interval<T>(v7,v9);
+ 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 = closed_interval<T>(v3,v7);
- interval<T> C7_9I = leftopen_interval<T>(v7,v9);
+ 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 );
@@ -215,12 +215,12 @@
     T v7 = make<T>(7);
     T v9 = make<T>(9);
 
- interval<T> I3_6I = closed_interval<T>(v3,v6);
- interval<T> I7_9I = closed_interval<T>(v7,v9);
+ 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 = rightopen_interval<T>(v3,v7);
- interval<T> C6_9I = leftopen_interval<T>(v6,v9);
+ 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 );
 }
 
@@ -236,35 +236,35 @@
     T v9 = make<T>(9);
 
     interval<T> section;
- interval<T> I3_7D = rightopen_interval<T>(v3,v7);
+ interval<T> I3_7D = interval<T>::rightopen(v3,v7);
 
- interval<T> I0_3D = rightopen_interval<T>(v0,v3);
+ 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 = rightopen_interval<T>(v0,v5);
+ interval<T> I0_5D = interval<T>::rightopen(v0,v5);
     section = I3_7D; section *= I0_5D;
- BOOST_CHECK_EQUAL( section, rightopen_interval<T>(v3, v5) );
+ BOOST_CHECK_EQUAL( section, interval<T>::rightopen(v3, v5) );
 
- interval<T> I0_9D = rightopen_interval<T>(v0,v9);
+ 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 = closed_interval<T>(v4,v5);
+ 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 = open_interval<T>(v4,v6);
+ 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 = leftopen_interval<T>(v4,v9);
+ interval<T> C4_9I = interval<T>::leftopen(v4,v9);
     section = I3_7D; section *= C4_9I;
- BOOST_CHECK_EQUAL( section, open_interval<T>(v4,v7) );
+ BOOST_CHECK_EQUAL( section, interval<T>::open(v4,v7) );
 
- interval<T> I7_9I = closed_interval<T>(v7,v9);
+ 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 );

Modified: sandbox/itl/libs/itl_xt/example/history/history.cpp
==============================================================================
--- sandbox/itl/libs/itl_xt/example/history/history.cpp (original)
+++ sandbox/itl/libs/itl_xt/example/history/history.cpp 2008-11-15 05:59:46 EST (Sat, 15 Nov 2008)
@@ -14,9 +14,6 @@
 #include <boost/itl/split_interval_map.hpp>
 #include "../toytime.h"
 
-using namespace std;
-using namespace boost::itl;
-
 /** Example history.cpp \file history.cpp
 
 History demonstrates further possibilities of an interval map
@@ -83,6 +80,9 @@
 #include <boost/itl_xt/episode_product.hpp>
 #include <boost/itl_xt/product_history.hpp>
 
+using namespace std;
+using namespace boost::itl;
+
 
 /* To use a product_history object, we need an TypeDomain-class, specifying
     an enumeration type and a common value type for all episodes of a given
@@ -157,8 +157,8 @@
 class DiagnosisEpisode : public HospitalEpisodes
 {
 public:
- DiagnosisEpisode(Time begin, Time end, const std::string& val)
- : HospitalEpisodes(rightopen_interval(begin,end),val){}
+ DiagnosisEpisode(Time begin, Time end, const std::string& val)
+ : HospitalEpisodes(boost::itl::interval<Time>::rightopen(begin,end),val){}
 
     HospitalTypeDomain::DomainET type()const { return HospitalTypeDomain::diagnosis; }
 };
@@ -168,7 +168,7 @@
 {
 public:
     WardEpisode(Time begin, Time end, const std::string& val)
- : HospitalEpisodes(rightopen_interval(begin,end),val){}
+ : HospitalEpisodes(boost::itl::interval<Time>::rightopen(begin,end),val){}
 
     HospitalTypeDomain::DomainET type()const { return HospitalTypeDomain::ward; }
 };


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