Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r66132 - in sandbox/itl: boost/itl boost/itl/concept boost/itl/detail boost/itl/type_traits boost/itl_xt libs/itl/example/boost_party_ libs/itl/example/interval_container_ libs/itl/example/user_groups_ libs/itl/test libs/itl/test/fastest_itl_interval_ libs/itl/test/fastest_itl_map_ libs/itl/test/fastest_set_itl_set_ libs/itl/test/test_casual_ libs/itl/test/test_itl_interval_ libs/itl_xt/example/history_
From: afojgo_at_[hidden]
Date: 2010-10-21 07:23:35


Author: jofaber
Date: 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
New Revision: 66132
URL: http://svn.boost.org/trac/boost/changeset/66132

Log:
Refactoring: Removed all occurrences of icl::set and adjusted the code. Stable{msvc-9.0, gcc-3.4.4}

Text files modified:
   sandbox/itl/boost/itl/concept/element_associator.hpp | 1 +
   sandbox/itl/boost/itl/concept/element_set.hpp | 7 ++++---
   sandbox/itl/boost/itl/concept/set_value.hpp | 5 +++--
   sandbox/itl/boost/itl/detail/design_config.hpp | 6 +++---
   sandbox/itl/boost/itl/detail/interval_morphism.hpp | 8 +++++---
   sandbox/itl/boost/itl/detail/map_algo.hpp | 3 ++-
   sandbox/itl/boost/itl/interval.hpp | 2 +-
   sandbox/itl/boost/itl/interval_base_set.hpp | 23 ++++++++++++++++-------
   sandbox/itl/boost/itl/interval_set.hpp | 6 +++---
   sandbox/itl/boost/itl/map.hpp | 7 ++++---
   sandbox/itl/boost/itl/separate_interval_set.hpp | 6 +++---
   sandbox/itl/boost/itl/set.hpp | 2 +-
   sandbox/itl/boost/itl/split_interval_set.hpp | 6 +++---
   sandbox/itl/boost/itl/type_traits/interval_type_default.hpp | 2 +-
   sandbox/itl/boost/itl_xt/interval_bitset.hpp | 8 +++++---
   sandbox/itl/libs/itl/example/boost_party_/boost_party.cpp | 2 +-
   sandbox/itl/libs/itl/example/interval_container_/interval_container.cpp | 2 +-
   sandbox/itl/libs/itl/example/user_groups_/user_groups.cpp | 2 +-
   sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp | 6 +++---
   sandbox/itl/libs/itl/test/fastest_itl_map_/fastest_itl_map.cpp | 8 ++++++++
   sandbox/itl/libs/itl/test/fastest_set_itl_set_/fastest_set_itl_set.cpp | 8 ++++++++
   sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp | 38 ++++++++++++++++++++++++++++++++++----
   sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp | 4 ++--
   sandbox/itl/libs/itl/test/test_interval_map_shared.hpp | 2 +-
   sandbox/itl/libs/itl/test/test_itl_interval_/test_itl_interval.cpp | 4 ++--
   sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp | 4 ++--
   sandbox/itl/libs/itl/test/test_itl_map.hpp | 4 ++--
   sandbox/itl/libs/itl/test/test_laws.hpp | 29 +++++++++++++++--------------
   sandbox/itl/libs/itl/test/test_set_itl_set.hpp | 12 +++++-------
   sandbox/itl/libs/itl_xt/example/history_/history.cpp | 2 +-
   30 files changed, 141 insertions(+), 78 deletions(-)

Modified: sandbox/itl/boost/itl/concept/element_associator.hpp
==============================================================================
--- sandbox/itl/boost/itl/concept/element_associator.hpp (original)
+++ sandbox/itl/boost/itl/concept/element_associator.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -11,6 +11,7 @@
 #include <boost/itl/type_traits/is_associative_element_container.hpp>
 #include <boost/itl/type_traits/is_key_container_of.hpp>
 #include <boost/itl/type_traits/is_combinable.hpp>
+#include <boost/itl/detail/subset_comparer.hpp>
 #include <boost/itl/concept/element_set.hpp>
 #include <boost/itl/concept/element_map.hpp>
 

Modified: sandbox/itl/boost/itl/concept/element_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/concept/element_set.hpp (original)
+++ sandbox/itl/boost/itl/concept/element_set.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -11,6 +11,7 @@
 #include <boost/itl/type_traits/is_combinable.hpp>
 #include <boost/itl/concept/set_value.hpp>
 #include <boost/itl/detail/std_set.hpp>
+#include <boost/itl/detail/set_algo.hpp>
 
 
 namespace boost{ namespace icl
@@ -67,9 +68,9 @@
 
 template<class Type>
 inline typename enable_if<is_element_set<Type>, bool>::type
-intersects(const Type& object, const typename Type::domain_type& operand)
+intersects(const Type& object, const typename Type::key_type& operand)
 {
- return icl::contains(object, operand);
+ return !(object.find(operand) == object.end());
 }
 
 template<class Type>
@@ -127,7 +128,7 @@
 {
     stream << "{";
     ICL_const_FORALL(typename Type, it, object)
- stream << *it << " ";
+ stream << (*it) << " ";
 
     return stream << "}";
 }

Modified: sandbox/itl/boost/itl/concept/set_value.hpp
==============================================================================
--- sandbox/itl/boost/itl/concept/set_value.hpp (original)
+++ sandbox/itl/boost/itl/concept/set_value.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -9,6 +9,7 @@
 #define BOOST_ICL_CONCEPT_SET_VALUE_HPP_JOFA_100924
 
 #include <boost/itl/type_traits/is_set.hpp>
+#include <boost/itl/type_traits/codomain_type_of.hpp>
 
 namespace boost{ namespace icl
 {
@@ -25,8 +26,8 @@
 
 template<class Type>
 inline typename enable_if<is_set<Type>, typename Type::value_type>::type
-make_value(const typename Type:: key_type& key_val,
- const typename Type::codomain_type& )
+make_value(const typename Type::key_type& key_val,
+ const typename codomain_type_of<Type>::type& )
 {
     return typename Type::value_type(key_val);
 }

Modified: sandbox/itl/boost/itl/detail/design_config.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/design_config.hpp (original)
+++ sandbox/itl/boost/itl/detail/design_config.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -21,10 +21,10 @@
 
 // If this macro is defined, right_open_interval with static interval borders
 // will be used as default for all interval containers.
-// ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS should be defined in the application
+// BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS should be defined in the application
 // before other includes from the ITL
-//#define ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS //JODO comment this out for the final release
-// If ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS is NOT defined, ITL uses intervals
+//#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS //JODO comment this out for the final release
+// If BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS is NOT defined, ITL uses intervals
 // with dynamic borders as default.
 
 #ifdef ICL_USE_DYNAMIC_INTERVAL_BORDERS_DEFAULTS //JODO remove this for the final release

Modified: sandbox/itl/boost/itl/detail/interval_morphism.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/interval_morphism.hpp (original)
+++ sandbox/itl/boost/itl/detail/interval_morphism.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -37,10 +37,12 @@
             typedef typename IntervalContainerT::key_type key_type;
             ICL_const_FORALL(typename ElementContainerT, element_, src)
             {
- const typename ElementContainerT::key_type& key = key_value<ElementContainerT>(element_);
- const typename ElementContainerT::data_type& data = co_value<ElementContainerT>(element_);
+ const typename ElementContainerT::key_type& key
+ = key_value<ElementContainerT>(element_);
+ const typename codomain_type_of<ElementContainerT>::type& coval
+ = co_value<ElementContainerT>(element_);
 
- result += icl::make_value<IntervalContainerT>(key_type(key), data);
+ result += icl::make_value<IntervalContainerT>(key_type(key), coval);
             }
         }
 

Modified: sandbox/itl/boost/itl/detail/map_algo.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/map_algo.hpp (original)
+++ sandbox/itl/boost/itl/detail/map_algo.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -34,7 +34,8 @@
 
     co_iterator right_ = right_common_lower_;
     while(right_ != right_common_upper_)
- if(icl::intersects(left, key_value<CoObjectT>(right_++)))
+ //CL if(icl::intersects(left, key_value<CoObjectT>(right_++)))
+ if(!(left.find(key_value<CoObjectT>(right_++))==left.end()))
             return true;
 
     return false;

Modified: sandbox/itl/boost/itl/interval.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval.hpp (original)
+++ sandbox/itl/boost/itl/interval.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -21,7 +21,7 @@
         typedef typename interval_type_default<DomainT,Compare>::type interval_type;
         typedef interval_type type;
 
-#ifdef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 
         static inline interval_type open(const DomainT& low, const DomainT& up)
         {

Modified: sandbox/itl/boost/itl/interval_base_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_set.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -9,6 +9,16 @@
 #ifndef BOOST_ICL_INTERVAL_BASE_SET_H_JOFA_990223
 #define BOOST_ICL_INTERVAL_BASE_SET_H_JOFA_990223
 
+#include <boost/itl/impl_config.hpp>
+
+#if defined(ICL_USE_BOOST_INTERPROCESS_IMPLEMENTATION)
+#include <boost/interprocess/containers/set.hpp>
+#elif defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION)
+#include <boost/container/set.hpp>
+#else
+#include <set>
+#endif
+
 #include <limits>
 #include <boost/next_prior.hpp>
 #include <boost/itl/type_traits/interval_type_default.hpp>
@@ -27,7 +37,6 @@
 
 #include <boost/itl/right_open_interval.hpp>
 #include <boost/itl/continuous_interval.hpp>
-#include <boost/itl/set.hpp>
 #include <boost/itl/detail/notate.hpp>
 #include <boost/itl/detail/element_iterator.hpp>
 
@@ -62,12 +71,6 @@
     typedef type overloadable_type;
 
     //--------------------------------------------------------------------------
- //- Associated types: Related types
- //--------------------------------------------------------------------------
- /// The atomized type representing the corresponding container of elements
- typedef typename icl::set<DomainT,Compare,Alloc> atomized_type;
-
- //--------------------------------------------------------------------------
     //- Associated types: Data
     //--------------------------------------------------------------------------
     /// The domain type of the set
@@ -106,6 +109,12 @@
     typedef exclusive_less_than<interval_type> key_compare;
 
     //--------------------------------------------------------------------------
+ //- Associated types: Related types
+ //--------------------------------------------------------------------------
+ /// The atomized type representing the corresponding container of elements
+ typedef typename std::set<DomainT,domain_compare,Alloc<DomainT> > atomized_type;
+
+ //--------------------------------------------------------------------------
     //- Associated types: Implementation and stl related
     //--------------------------------------------------------------------------
     /// The allocator type of the set

Modified: sandbox/itl/boost/itl/interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_set.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -68,15 +68,15 @@
     typedef Alloc<DomainT> domain_allocator_type;
 
     /// The corresponding atomized type representing this interval container of elements
- typedef typename icl::set<DomainT,Compare,Alloc> atomized_type;
+ typedef typename base_type::atomized_type atomized_type;
 
     /// Container type for the implementation
- typedef typename icl::set<interval_type,ICL_EXCLUSIVE_LESS(interval_type),Alloc> ImplSetT;
+ typedef typename base_type::ImplSetT ImplSetT;
 
     /// key type of the implementing container
     typedef typename ImplSetT::key_type key_type;
     /// data type of the implementing container
- typedef typename ImplSetT::data_type data_type;
+ typedef typename ImplSetT::value_type data_type;
     /// value type of the implementing container
     typedef typename ImplSetT::value_type value_type;
 

Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -33,7 +33,6 @@
 #include <boost/itl/type_traits/to_string.hpp>
 #include <boost/itl/functors.hpp>
 #include <boost/itl/predicates.hpp>
-#include <boost/itl/set.hpp>
 
 #include <boost/itl/detail/map_algo.hpp>
 #include <boost/itl/concept/container.hpp>
@@ -101,8 +100,6 @@
     typedef typename icl::map<DomainT,CodomainT,Traits, Compare,Combine,Section,Alloc> type;
     typedef typename ICL_IMPL_SPACE::map<DomainT, CodomainT, ICL_COMPARE_DOMAIN(Compare,DomainT),
                                          allocator_type> base_type;
- typedef typename icl::set<DomainT, Compare, Alloc > set_type;
- typedef set_type key_object_type;
 
     typedef Traits traits;
 
@@ -128,6 +125,10 @@
     typedef typename inverse<codomain_intersect>::type inverse_codomain_intersect;
     typedef typename base_type::value_compare value_compare;
 
+ typedef typename std::set<DomainT, domain_compare, Alloc<DomainT> > set_type;
+ typedef set_type key_object_type;
+
+
     BOOST_STATIC_CONSTANT(bool, _total = (Traits::is_total));
     BOOST_STATIC_CONSTANT(bool, _absorbs = (Traits::absorbs_identities));
     BOOST_STATIC_CONSTANT(bool,

Modified: sandbox/itl/boost/itl/separate_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/separate_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/separate_interval_set.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -65,15 +65,15 @@
     typedef Alloc<DomainT> domain_allocator_type;
 
     /// The corresponding atomized type representing this interval container of elements
- typedef typename icl::set<DomainT,Compare,Alloc> atomized_type;
+ typedef typename base_type::atomized_type atomized_type;
 
     /// Container type for the implementation
- typedef typename icl::set<interval_type,ICL_EXCLUSIVE_LESS(interval_type),Alloc> ImplSetT;
+ typedef typename base_type::ImplSetT ImplSetT;
 
     /// key type of the implementing container
     typedef typename ImplSetT::key_type key_type;
     /// data type of the implementing container
- typedef typename ImplSetT::data_type data_type;
+ typedef typename ImplSetT::value_type data_type;
     /// value type of the implementing container
     typedef typename ImplSetT::value_type value_type;
 

Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp (original)
+++ sandbox/itl/boost/itl/set.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -157,7 +157,7 @@
     { return icl::contains(*this, sub); }
 
     /** Is <tt>*this</tt> contained in <tt>super</tt>? */
- bool contained_in(const set& super)const
+ bool within(const set& super)const
     { return icl::within(*this, super); }
 
     /** <tt>*this</tt> and <tt>x2</tt> are disjoint, if their intersection is empty */

Modified: sandbox/itl/boost/itl/split_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_set.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -64,15 +64,15 @@
     typedef Alloc<DomainT> domain_allocator_type;
 
     /// The corresponding atomized type representing this interval container of elements
- typedef typename icl::set<DomainT,Compare,Alloc> atomized_type;
+ typedef typename base_type::atomized_type atomized_type;
 
     /// Container type for the implementation
- typedef typename icl::set<interval_type,ICL_EXCLUSIVE_LESS(interval_type),Alloc> ImplSetT;
+ typedef typename base_type::ImplSetT ImplSetT;
 
     /// key type of the implementing container
     typedef typename ImplSetT::key_type key_type;
     /// data type of the implementing container
- typedef typename ImplSetT::data_type data_type;
+ typedef typename ImplSetT::value_type data_type;
     /// value type of the implementing container
     typedef typename ImplSetT::value_type value_type;
 

Modified: sandbox/itl/boost/itl/type_traits/interval_type_default.hpp
==============================================================================
--- sandbox/itl/boost/itl/type_traits/interval_type_default.hpp (original)
+++ sandbox/itl/boost/itl/type_traits/interval_type_default.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -25,7 +25,7 @@
     template <class DomainT, ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, DomainT)>
     struct interval_type_default
     {
-#ifdef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#ifdef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
         typedef
             typename mpl::if_< is_discrete<DomainT>
 # ifdef BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT

Modified: sandbox/itl/boost/itl_xt/interval_bitset.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/interval_bitset.hpp (original)
+++ sandbox/itl/boost/itl_xt/interval_bitset.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -17,6 +17,7 @@
 #include <boost/itl_xt/bits.hpp> // a bitset implementation
 #include <boost/itl_xt/detail/bit_element_iterator.hpp>
 
+//CL #include <boost/itl/set.hpp> //JODO URG
 #include <boost/itl/detail/interval_morphism.hpp> //JODO Separate aspects and concerns
 
 
@@ -92,7 +93,8 @@
     typedef typename interval_bitmap_type::key_type key_type;
     typedef typename interval_bitmap_type::value_type value_type;
 
- typedef typename icl::set<DomainT,Compare,Alloc> atomized_type;
+ typedef typename interval_bitmap_type::domain_compare domain_compare;
+ typedef typename std::set<DomainT,domain_compare,Alloc<DomainT> > atomized_type;
 
     typedef typename interval_bitmap_type::iterator iterator;
     typedef typename interval_bitmap_type::const_iterator const_iterator;
@@ -526,9 +528,9 @@
 namespace segmental
 {
     template <typename DomainT, typename BitSetT>
- struct atomizer<icl::set<DomainT>, interval_bitset<DomainT, BitSetT> >
+ struct atomizer<std::set<DomainT>, interval_bitset<DomainT, BitSetT> >
     {
- void operator()( icl::set<DomainT>& atomized,
+ void operator()( std::set<DomainT>& atomized,
                         const interval_bitset<DomainT, BitSetT>& clustered)
         {
             typedef interval_bitset<DomainT, BitSetT> InterBitsetT;

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 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -54,7 +54,7 @@
 #include <boost/itl/ptime.hpp>
 
 // Prior to other includes for interval containers we define ...
-#define ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 // ... so all interval containers will use right_open_intervals that
 // have static interval borders.
 

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 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -18,7 +18,7 @@
 #include <iostream>
 
 // Prior to other includes for interval containers we define ...
-#define ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 // ... so all interval containers will use right_open_intervals that
 // have static interval borders.
 

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 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -44,7 +44,7 @@
 // Type icl::set<string> collects the names a user group's members. Therefore
 // it needs to implement operator += that performs a set union on overlap of
 // intervals.
-typedef boost::icl::set<string> MemberSetT;
+typedef std::set<string> MemberSetT;
 
 // boost::gregorian::date is the domain type the interval map.
 // It's key values are therefore time intervals: discrete_interval<date>. The content

Modified: sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp (original)
+++ sandbox/itl/libs/itl/test/fastest_itl_interval_/fastest_itl_interval.cpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -10,7 +10,7 @@
 #include <boost/mpl/list.hpp>
 #include "../unit_test_unwarned.hpp"
 
-//#define ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+//#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 
 // interval instance types
 #include "../test_type_lists.hpp"
@@ -135,7 +135,7 @@
 (fastest_itl_interval_touches_4_integral_types)
 { interval_touches_4_integral_types<integral_type_4>(); }
 
-#ifndef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_interval_ctor_specific)
@@ -159,4 +159,4 @@
 (fastest_itl_interval_subtract_4_bicremental_types)
 { interval_subtract_4_bicremental_types<bicremental_type_5>(); }
 
-#endif // ndef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#endif // ndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS

Modified: sandbox/itl/libs/itl/test/fastest_itl_map_/fastest_itl_map.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/fastest_itl_map_/fastest_itl_map.cpp (original)
+++ sandbox/itl/libs/itl/test/fastest_itl_map_/fastest_itl_map.cpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -16,6 +16,14 @@
 #include "../test_value_maker.hpp"
 #include "../test_laws.hpp"
 
+//JODO include
+//------------------------------------------------------------------------------
+#include <set>
+#include <boost/itl/concept/container.hpp>
+#include <boost/itl/concept/element_set.hpp>
+#include <boost/itl/concept/element_associator.hpp>
+//------------------------------------------------------------------------------
+
 #include <boost/itl/map.hpp>
 #include <boost/itl/interval_map.hpp>
 #include <boost/itl/detail/interval_morphism.hpp>

Modified: sandbox/itl/libs/itl/test/fastest_set_itl_set_/fastest_set_itl_set.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/fastest_set_itl_set_/fastest_set_itl_set.cpp (original)
+++ sandbox/itl/libs/itl/test/fastest_set_itl_set_/fastest_set_itl_set.cpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -16,6 +16,14 @@
 #include "../test_value_maker.hpp"
 #include "../test_laws.hpp"
 
+//JODO include
+//------------------------------------------------------------------------------
+#include <set>
+#include <boost/itl/concept/container.hpp>
+#include <boost/itl/concept/element_set.hpp>
+#include <boost/itl/concept/element_associator.hpp>
+//------------------------------------------------------------------------------
+
 #include <boost/itl/interval_set.hpp>
 #include <boost/itl/separate_interval_set.hpp>
 #include <boost/itl/split_interval_set.hpp>

Modified: sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp (original)
+++ sandbox/itl/libs/itl/test/test_casual_/test_casual.cpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -18,10 +18,11 @@
 #include "../test_value_maker.hpp"
 
 #include <boost/type_traits/is_same.hpp>
+#include <boost/type_traits/is_const.hpp>
 #include <boost/detail/is_incrementable.hpp>
 #include <boost/type_traits/is_floating_point.hpp>
 
-#define ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 #define BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT right_open_interval
 #define BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS 2 //0=() 1=(] 2=[) 3=[]
 
@@ -31,6 +32,7 @@
 #include <boost/itl/interval_map.hpp>
 #include <boost/itl/split_interval_map.hpp>
 #include <boost/itl/detail/element_iterator.hpp>
+#include <boost/itl/detail/interval_morphism.hpp>
 #include <boost/itl/ptime.hpp>
 #include <boost/itl/type_traits/is_key_container_of.hpp>
 #include <boost/itl/type_traits/codomain_type_of.hpp>
@@ -39,6 +41,7 @@
 #include <boost/itl_xt/detail/bit_element_iterator.hpp>
 #include <boost/itl_xt/interval_bitset.hpp>
 #include <boost/itl_xt/list.hpp>
+#include <boost/itl/set.hpp> //JODO
 
 #include <limits>
 #include <bitset>
@@ -50,6 +53,24 @@
 using namespace boost::icl;
 
 
+BOOST_AUTO_TEST_CASE(ad_hoc)
+{
+ std::set<int> set_a;
+ set_a += 1;
+ icl::add(set_a, 4);
+ icl::add(set_a, 5);
+ set_a -= 4;
+ cout << set_a << endl;
+
+ interval_set<int> itv_set_b;
+ itv_set_b += interval<int>::right_open(1,3);
+
+ std::set<int> set_b;
+
+ segmental::atomize(set_b, itv_set_b);
+ cout << set_b << endl;
+}
+
 BOOST_AUTO_TEST_CASE(intro_sample_42)
 {
     interval_set<int> mySet;
@@ -329,7 +350,7 @@
     BOOST_CHECK_EQUAL( is_interval_set<std::set<int> >::value, false );
     BOOST_CHECK_EQUAL( is_interval_set<std::set<int> >::value, false );
 
-#if defined(ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && !defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+#if defined(BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS) && !defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
     BOOST_CHECK( (is_same<icl::interval<int >::type, right_open_interval<int > >::value) );
     BOOST_CHECK( (is_same<icl::interval<double>::type, right_open_interval<double> >::value) );
 
@@ -343,7 +364,7 @@
     //BOOST_CHECK_EQUAL( icl::interval<float>::left_open(1.0,2.0), icl::construct<right_open_interval<float> >(1.0,2.0) );
 #endif
 
-#if defined(ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+#if defined(BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
 # if defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS) && (BOOST_ICL_DISCRETE_STATIC_INTERVAL_BORDERS == 0)
     cout << "discrete_interval == open_interval\n";
     BOOST_CHECK( (is_same<icl::interval<int>::type, open_interval<int> >::value) );
@@ -378,11 +399,20 @@
 
 # else
     cout << "#else part, INTERVAL_BORDERS not in {0,1,2,3}\n";
-#endif //defined(ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
+#endif //defined(BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS) && defined(BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT)
 
 #else
     BOOST_CHECK( (is_same<icl::interval<int >::type, discrete_interval<int > >::value) );
     BOOST_CHECK( (is_same<icl::interval<double>::type, continuous_interval<double> >::value) );
 #endif
+
+ cout << "--->\n";
+ BOOST_CHECK_EQUAL( (is_set<std::set<int> >::value), true );
+ BOOST_CHECK_EQUAL( (is_element_set<std::set<int> >::value), true );
+ BOOST_CHECK_EQUAL( (is_map<std::set<int> >::value), false );
+
+ BOOST_CHECK_EQUAL( (is_const<std::set<int>::key_type >::value), false );
+ BOOST_CHECK_EQUAL( (is_const<std::set<int>::value_type >::value), false );
+
 }
 

Modified: sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp (original)
+++ sandbox/itl/libs/itl/test/test_icl_continuous_interval.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -49,7 +49,7 @@
     test_inner_complement<T,Compare,C__I>(MK_I(C__I,0,2), MK_I(C__I,0,6));
 
     //--------------------------------------------------------------------------
-#ifndef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
     test_inner_complement<T,Compare,IntervalT>(I_D(0,4), I_D(8,9));
     test_inner_complement<T,Compare,IntervalT>(I_D(7,8), I_D(2,3));
     test_inner_complement<T,Compare,IntervalT>(I_D(2,4), I_D(4,6));
@@ -74,7 +74,7 @@
     test_inner_complement<T,Compare,IntervalT>(C_D(3,0), C_D(4,0));
     test_inner_complement<T,Compare,IntervalT>(C_D(0,2), C_D(4,6));
     test_inner_complement<T,Compare,IntervalT>(C_D(0,2), C_D(0,6));
-#endif //ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#endif //BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 }
 
 

Modified: sandbox/itl/libs/itl/test/test_interval_map_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_interval_map_shared.hpp (original)
+++ sandbox/itl/libs/itl/test/test_interval_map_shared.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -1169,7 +1169,7 @@
     typedef typename IntervalMapT::interval_type IntervalT;
     typedef typename IntervalMap<T,U,Trt>::set_type IntervalSetT;
     typedef icl::map<T,U,Trt> MapT;
- typedef icl::set<T> SetT;
+ typedef std::set<T> SetT;
 
     IntervalMapT itv_map_sub_a, itv_map_a, itv_map_a2, itv_map_super_a,
                  itv_map_b, itv_map_c;

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 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -165,7 +165,7 @@
 (fastest_itl_interval_subtract_4_bicremental_types, T, bicremental_types)
 { interval_subtract_4_bicremental_types<T>(); }
 
-#ifndef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 
 BOOST_AUTO_TEST_CASE
 (fastest_itl_interval_ctor_specific)
@@ -185,7 +185,7 @@
 (fastest_itl_interval_infix_intersect_4_bicremental_types, T, discrete_types)
 { interval_infix_intersect_4_bicremental_types<T>(); }
 
-#endif // ndef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#endif // ndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 
 
 

Modified: sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_interval_shared.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -63,7 +63,7 @@
     test_inner_complement<DomainT, std::less, IntervalT>(itv1, itv2);
 }
 
-#ifndef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 
 void interval_ctor_specific()
 {
@@ -78,7 +78,7 @@
                       icl::infinity<size_type_of<icl::interval<double>::type>::type >::value() );
 }
 
-#endif // ndef ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#endif // ndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 
 template <class T>
 void interval_equal_4_integral_types()

Modified: sandbox/itl/libs/itl/test/test_itl_map.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_itl_map.hpp (original)
+++ sandbox/itl/libs/itl/test/test_itl_map.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -23,7 +23,7 @@
 {
     typedef IntervalMap<T,U,Trt> IntervalMapT;
     typedef icl::map<T,U,Trt> MapT;
- typedef icl::set<T> SetT;
+ typedef std::set<T> SetT;
     typedef typename MapT::element_type map_element_type;
 
     IntervalMapT itv_map_a;
@@ -93,7 +93,7 @@
 {
     typedef IntervalMap<T,U,Trt> IntervalMapT;
     typedef icl::map<T,U,Trt> MapT;
- typedef icl::set<T> SetT;
+ typedef std::set<T> SetT;
 
     IntervalMapT itv_map_sub_a, itv_map_a, itv_map_super_a,
                  itv_map_b, itv_map_c;

Modified: sandbox/itl/libs/itl/test/test_laws.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_laws.hpp (original)
+++ sandbox/itl/libs/itl/test/test_laws.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -8,6 +8,7 @@
 #ifndef BOOST_LIBS_ICL_TEST_ICL_LAWS_HPP_JOFA_090119
 #define BOOST_LIBS_ICL_TEST_ICL_LAWS_HPP_JOFA_090119
 
+#include <functional>
 #include <boost/itl/type_traits/identity_element.hpp>
 
 namespace boost{namespace icl
@@ -35,7 +36,7 @@
 { \
     Type left = (a op_sign b) op_sign c; \
     Type right = a op_sign (b op_sign c); \
- BOOST_CHECK_EQUAL(left,right); \
+ BOOST_CHECK(left==right); \
 }
 
 #define DEFINE_ASSOCIATIVITY_CHECK_WRT_EQUAL(op_tag, op_sign) \
@@ -46,7 +47,7 @@
 { \
     Type left = (a op_sign b) op_sign c; \
     Type right = a op_sign (b op_sign c); \
- BOOST_CHECK_EQUAL((*equal)(left,right), true); \
+ BOOST_CHECK((*equal)(left,right)); \
 }
 
 // Here we define the call of the test function thats definition
@@ -77,7 +78,7 @@
 { \
     Type left = a op_sign identity_element; \
     Type right = identity_element; \
- BOOST_CHECK_EQUAL((*equal)(left,right), true); \
+ BOOST_CHECK((*equal)(left,right)); \
 }
 
 #define DEFINE_RIGHT_NEUTRALITY_CHECK_WRT(op_tag, op_sign) \
@@ -87,7 +88,7 @@
 { \
     Type left = a op_sign identity_element; \
     Type right = identity_element; \
- BOOST_CHECK_EQUAL(left,right); \
+ BOOST_CHECK(left==right); \
 }
 
 #define DEFINE_NEUTRALITY_CHECK_WRT_EQUAL(op_tag, op_sign) \
@@ -97,7 +98,7 @@
 { \
     Type left = a op_sign identity_element; \
     Type right = identity_element op_sign a; \
- BOOST_CHECK_EQUAL((*equal)(left,right), true); \
+ BOOST_CHECK((*equal)(left,right)); \
 }
 
 #define DEFINE_NEUTRALITY_CHECK_WRT(op_tag, op_sign) \
@@ -107,7 +108,7 @@
 { \
     Type left = a op_sign identity_element; \
     Type right = identity_element op_sign a; \
- BOOST_CHECK_EQUAL(left,right); \
+ BOOST_CHECK(left==right); \
 }
 
 #define CHECK_NEUTRALITY_WRT(op_tag) check_neutrality_wrt_##op_tag
@@ -135,7 +136,7 @@
 { \
     Type left = a op_sign b; \
     Type right = b op_sign a; \
- BOOST_CHECK_EQUAL((*equal)(left,right), true); \
+ BOOST_CHECK((*equal)(left,right)); \
 }
 
 #define DEFINE_COMMUTATIVITY_CHECK_WRT(op_tag, op_sign) \
@@ -144,7 +145,7 @@
 { \
     Type left = a op_sign b; \
     Type right = b op_sign a; \
- BOOST_CHECK_EQUAL(left,right); \
+ BOOST_CHECK(left==right); \
 }
 
 #define CHECK_COMMUTATIVITY_WRT_EQUAL(op_tag) check_commutativity_wrt_equal_##op_tag
@@ -169,7 +170,7 @@
 (typename equality<Type>::type* equal, const Type& identity_element, const Type& var_a) \
 { \
     Type positive_difference = var_a - var_a; \
- BOOST_CHECK_EQUAL((*equal)(positive_difference, identity_element), true); \
+ BOOST_CHECK((*equal)(positive_difference, identity_element)); \
 }
 
 #define DEFINE_PARTIAL_INVERSION_CHECK_WRT(plus_tag, plus_sign) \
@@ -178,7 +179,7 @@
 (const Type& identity_element, const Type& var_a) \
 { \
     Type positive_difference = var_a - var_a; \
- BOOST_CHECK_EQUAL(positive_difference, identity_element); \
+ BOOST_CHECK(positive_difference==identity_element); \
 }
 
 #define CHECK_PARTIAL_INVERSION_WRT_EQUAL(plus_tag) check_partial_inversion_wrt_equal_##plus_tag
@@ -199,9 +200,9 @@
 (typename equality<Type>::type* equal, const Type& identity_element, const Type& var_a) \
 { \
     Type positive_difference = var_a - var_a; \
- BOOST_CHECK_EQUAL((*equal)(positive_difference, identity_element), true); \
+ BOOST_CHECK((*equal)(positive_difference, identity_element)); \
     Type negative_difference = (identity_element - var_a) plus_sign var_a; \
- BOOST_CHECK_EQUAL((*equal)(negative_difference, identity_element), true); \
+ BOOST_CHECK((*equal)(negative_difference, identity_element)); \
 }
 
 #define DEFINE_INVERSE_CHECK_WRT(plus_tag, plus_sign) \
@@ -210,9 +211,9 @@
 (const Type& identity_element, const Type& var_a) \
 { \
     Type positive_difference = var_a - var_a; \
- BOOST_CHECK_EQUAL(positive_difference, identity_element); \
+ BOOST_CHECK(positive_difference==identity_element); \
     Type negative_difference = (identity_element - var_a) plus_sign var_a; \
- BOOST_CHECK_EQUAL(negative_difference, identity_element); \
+ BOOST_CHECK(negative_difference==identity_element); \
 }
 
 #define CHECK_INVERSE_WRT_EQUAL(plus_tag) check_inverse_wrt_equal_##plus_tag

Modified: sandbox/itl/libs/itl/test/test_set_itl_set.hpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_set_itl_set.hpp (original)
+++ sandbox/itl/libs/itl/test/test_set_itl_set.hpp 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -23,7 +23,7 @@
 {
     typedef IntervalSet<T> IntervalSetT;
     typedef typename IntervalSetT::interval_type IntervalT;
- typedef icl::set<T> SetT;
+ typedef std::set<T> SetT;
 
     IntervalSetT itv_set_a, itv_set_b, itv_set_c;
     itv_set_a.add(I_D(3,6)).add(I_I(5,7));
@@ -42,7 +42,6 @@
     CHECK_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, val1, val2);
 }
 
-
 template <class T,
           template<class T,
                    ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(std::less, U),
@@ -54,7 +53,7 @@
 {
     typedef IntervalSet<T> IntervalSetT;
     typedef typename IntervalSetT::interval_type IntervalT;
- typedef icl::set<T> SetT;
+ typedef std::set<T> SetT;
 
     IntervalSetT itv_set_a, itv_set_b, itv_set_c;
     itv_set_a.add(I_D(3,6)).add(I_I(5,7));
@@ -88,7 +87,7 @@
 {
     typedef IntervalSet<T> IntervalSetT;
     typedef typename IntervalSetT::interval_type IntervalT;
- typedef icl::set<T> SetT;
+ typedef std::set<T> SetT;
 
     IntervalSetT itv_set_a, itv_set_b, itv_set_c;
     itv_set_a.add(I_D(3,6)).add(I_I(5,7));
@@ -118,7 +117,7 @@
 {
     typedef IntervalSet<T> IntervalSetT;
     typedef typename IntervalSetT::interval_type IntervalT;
- typedef icl::set<T> SetT;
+ typedef std::set<T> SetT;
 
     IntervalSetT itv_set_a, itv_set_b, itv_set_c;
     itv_set_a.add(I_D(3,6)).add(I_I(5,7));
@@ -152,7 +151,7 @@
 {
     typedef IntervalSet<T> IntervalSetT;
     typedef typename IntervalSetT::interval_type IntervalT;
- typedef icl::set<T> SetT;
+ typedef std::set<T> SetT;
 
     IntervalSetT itv_set_a, itv_set_b, itv_set_c;
     itv_set_a.add(I_D(3,6)).add(I_I(5,7));
@@ -171,6 +170,5 @@
     CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, val1, val2);
 }
 
-
 #endif // __test_itl_set_itl_set_h_JOFA_090119__
 

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 2010-10-21 07:23:30 EDT (Thu, 21 Oct 2010)
@@ -12,7 +12,7 @@
 #include <iostream>
 
 // Prior to other includes for interval containers we define ...
-#define ICL_USE_STATIC_INTERVAL_BORDER_DEFAULTS
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 // ... so all interval containers will use right_open_intervals that
 // has static interval borders.
 


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