Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69449 - in trunk: boost/icl boost/icl/concept libs/icl/test libs/icl/test/fast_stat_interval_map_ libs/icl/test/fastest_icl_interval_ libs/icl/test/test_casual_
From: afojgo_at_[hidden]
Date: 2011-03-01 17:51:11


Author: jofaber
Date: 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
New Revision: 69449
URL: http://svn.boost.org/trac/boost/changeset/69449

Log:
Added interval_associator_base.hpp and refactored new code for icl::find. Added tests for interval maps using statically bounded intervals: test/fast_stat_interval_map_.
Added:
   trunk/boost/icl/concept/interval_associator_base.hpp (contents, props changed)
   trunk/libs/icl/test/fast_stat_interval_map_/
   trunk/libs/icl/test/fast_stat_interval_map_/fast_stat_interval_map.cpp (contents, props changed)
   trunk/libs/icl/test/fast_stat_interval_map_/vc9_fast_stat_interval_map.vcproj (contents, props changed)
   trunk/libs/icl/test/fast_stat_interval_map_cases.hpp (contents, props changed)
Text files modified:
   trunk/boost/icl/associative_interval_container.hpp | 1
   trunk/boost/icl/concept/interval.hpp | 8
   trunk/boost/icl/concept/interval_associator.hpp | 47 ---------
   trunk/boost/icl/concept/interval_map.hpp | 60 -----------
   trunk/boost/icl/concept/interval_set.hpp | 57 ----------
   trunk/boost/icl/interval_base_map.hpp | 2
   trunk/boost/icl/interval_base_set.hpp | 2
   trunk/libs/icl/test/Jamfile.v2 | 7
   trunk/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp | 5
   trunk/libs/icl/test/fastest_interval_map_cases.hpp | 18 +-
   trunk/libs/icl/test/test_casual_/test_casual.cpp | 34 +++---
   trunk/libs/icl/test/test_icl_interval.hpp | 4
   trunk/libs/icl/test/test_interval_map_shared.hpp | 203 +++++++++++++++++++++++++++++----------
   trunk/libs/icl/test/test_type_lists.hpp | 20 +-
   trunk/libs/icl/test/test_value_maker.hpp | 17 ++
   15 files changed, 216 insertions(+), 269 deletions(-)

Modified: trunk/boost/icl/associative_interval_container.hpp
==============================================================================
--- trunk/boost/icl/associative_interval_container.hpp (original)
+++ trunk/boost/icl/associative_interval_container.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -11,6 +11,7 @@
 #include <boost/icl/concept/comparable.hpp>
 #include <boost/icl/concept/joinable.hpp>
 #include <boost/icl/concept/container.hpp>
+#include <boost/icl/concept/interval_associator_base.hpp>
 #include <boost/icl/concept/interval_set.hpp>
 #include <boost/icl/concept/interval_map.hpp>
 #include <boost/icl/concept/interval_associator.hpp>

Modified: trunk/boost/icl/concept/interval.hpp
==============================================================================
--- trunk/boost/icl/concept/interval.hpp (original)
+++ trunk/boost/icl/concept/interval.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -131,7 +131,7 @@
 typename enable_if
 <
     mpl::and_< is_static_right_open<Type>
- , boost::detail::is_incrementable<typename interval_traits<Type>::domain_type> >
+ , boost::detail::is_incrementable<typename interval_traits<Type>::domain_type> >
   , Type
>::type
 unit_closure(const typename interval_traits<Type>::domain_type& value)
@@ -143,7 +143,7 @@
 typename enable_if
 <
     mpl::and_< is_static_left_open<Type>
- , boost::detail::is_incrementable<typename interval_traits<Type>::domain_type> >
+ , boost::detail::is_incrementable<typename interval_traits<Type>::domain_type> >
   , Type
>::type
 unit_closure(const typename interval_traits<Type>::domain_type& value)
@@ -158,7 +158,7 @@
 typename enable_if
 <
     mpl::and_< is_static_open<Type>
- , is_discrete<typename interval_traits<Type>::domain_type> >
+ , is_discrete<typename interval_traits<Type>::domain_type> >
   , Type
>::type
 unit_closure(const typename interval_traits<Type>::domain_type& value)
@@ -173,7 +173,7 @@
 typename enable_if
 <
     mpl::and_< is_static_closed<Type>
- , is_discrete<typename interval_traits<Type>::domain_type> >
+ , is_discrete<typename interval_traits<Type>::domain_type> >
   , Type
>::type
 unit_closure(const typename interval_traits<Type>::domain_type& value)

Modified: trunk/boost/icl/concept/interval_associator.hpp
==============================================================================
--- trunk/boost/icl/concept/interval_associator.hpp (original)
+++ trunk/boost/icl/concept/interval_associator.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -662,7 +662,7 @@
                    bool>::type
 intersects(const Type& left, const CoType& right)
 {
- return left.find(right) != left.end();
+ return left.find(right) != left.end();
 }
 
 
@@ -901,51 +901,6 @@
     return typename Type::element_const_reverse_iterator(object.rend());
 }
 
-//==============================================================================
-//= Morphisms
-//==============================================================================
-template<class Type>
-typename enable_if<is_interval_container<Type>, Type>::type&
-join(Type& object)
-{
- typedef typename Type::interval_type interval_type;
- typedef typename Type::iterator iterator;
-
- iterator it_ = object.begin();
- if(it_ == object.end())
- return object;
-
- iterator next_ = it_; next_++;
-
- while(next_ != object.end())
- {
- if( segmental::is_joinable<Type>(it_, next_) )
- {
- iterator fst_mem = it_; // hold the first member
-
- // Go on while touching members are found
- it_++; next_++;
- while( next_ != object.end()
- && segmental::is_joinable<Type>(it_, next_) )
- { it_++; next_++; }
-
- // finally we arrive at the end of a sequence of joinable intervals
- // and it points to the last member of that sequence
- const_cast<interval_type&>(key_value<Type>(it_))
- = hull(key_value<Type>(it_), key_value<Type>(fst_mem));
- object.erase(fst_mem, it_);
-
- it_++; next_=it_;
- if(next_!=object.end())
- next_++;
- }
- else { it_++; next_++; }
- }
- return object;
-}
-
-
-
 }} // namespace boost icl
 
 #endif

Added: trunk/boost/icl/concept/interval_associator_base.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/icl/concept/interval_associator_base.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -0,0 +1,119 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2011-2011: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_BASE_HPP_JOFA_110301
+#define BOOST_ICL_CONCEPT_INTERVAL_ASSOCIATOR_BASE_HPP_JOFA_110301
+
+#include <boost/icl/type_traits/domain_type_of.hpp>
+#include <boost/icl/type_traits/interval_type_of.hpp>
+#include <boost/icl/type_traits/is_combinable.hpp>
+#include <boost/icl/concept/set_value.hpp>
+#include <boost/icl/concept/map_value.hpp>
+#include <boost/icl/concept/interval.hpp>
+
+namespace boost{ namespace icl
+{
+
+//==============================================================================
+//= Selection<IntervalSet|IntervalMap>
+//==============================================================================
+template<class Type>
+typename enable_if<mpl::and_< is_interval_container<Type>
+ , is_discrete<typename domain_type_of<Type>::type>
+ >
+ , typename Type::const_iterator>::type
+find(const Type& object, const typename domain_type_of<Type>::type& key_val)
+{
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::interval_type interval_type;
+ return object.find(icl::unit_closure<interval_type>(key_val));
+}
+
+template<class Type>
+typename enable_if<mpl::and_< is_interval_container<Type>
+ , is_continuous<typename domain_type_of<Type>::type>
+ , has_dynamic_bounds<typename interval_type_of<Type>::type>
+ >
+ , typename Type::const_iterator>::type
+find(const Type& object, const typename domain_type_of<Type>::type& key_val)
+{
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::interval_type interval_type;
+ return object.find(icl::singleton<interval_type>(key_val));
+}
+
+template<class Type>
+typename enable_if<mpl::and_< is_interval_container<Type>
+ , is_continuous<typename domain_type_of<Type>::type>
+ , has_static_bounds<typename interval_type_of<Type>::type>
+ , boost::detail::is_incrementable<typename domain_type_of<Type>::type>
+ >
+ , typename Type::const_iterator>::type
+find(const Type& object, const typename domain_type_of<Type>::type& key_val)
+{
+ typedef typename Type::const_iterator const_iterator;
+ typedef typename Type::interval_type interval_type;
+ const_iterator collision = object.find(icl::unit_closure<interval_type>(key_val));
+ // A part of the cover(key_value)-interval may be found in the container, that
+ // does not contain key_value. Therefore we have to check for its existence:
+ return ( collision == object.end()
+ || icl::contains(key_value<Type>(collision), key_val) )
+ ? collision
+ : object.end();
+}
+
+// NOTE: find(object, key) won't compile if key is of continuous type that does
+// not implement in(de)crementation (e.g. std::string).
+
+//==============================================================================
+//= Morphisms
+//==============================================================================
+template<class Type>
+typename enable_if<is_interval_container<Type>, Type>::type&
+join(Type& object)
+{
+ typedef typename Type::interval_type interval_type;
+ typedef typename Type::iterator iterator;
+
+ iterator it_ = object.begin();
+ if(it_ == object.end())
+ return object;
+
+ iterator next_ = it_; next_++;
+
+ while(next_ != object.end())
+ {
+ if( segmental::is_joinable<Type>(it_, next_) )
+ {
+ iterator fst_mem = it_; // hold the first member
+
+ // Go on while touching members are found
+ it_++; next_++;
+ while( next_ != object.end()
+ && segmental::is_joinable<Type>(it_, next_) )
+ { it_++; next_++; }
+
+ // finally we arrive at the end of a sequence of joinable intervals
+ // and it points to the last member of that sequence
+ const_cast<interval_type&>(key_value<Type>(it_))
+ = hull(key_value<Type>(it_), key_value<Type>(fst_mem));
+ object.erase(fst_mem, it_);
+
+ it_++; next_=it_;
+ if(next_!=object.end())
+ next_++;
+ }
+ else { it_++; next_++; }
+ }
+ return object;
+}
+
+}} // namespace boost icl
+
+#endif
+
+

Modified: trunk/boost/icl/concept/interval_map.hpp
==============================================================================
--- trunk/boost/icl/concept/interval_map.hpp (original)
+++ trunk/boost/icl/concept/interval_map.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -22,11 +22,6 @@
 namespace boost{ namespace icl
 {
 
-template<class Type>
-typename enable_if<is_interval_container<Type>, Type>::type&
-join(Type&);
-
-
 template<class Type>
 inline typename enable_if<is_interval_map<Type>, typename Type::segment_type>::type
 make_segment(const typename Type::element_type& element)
@@ -38,59 +33,6 @@
 
 
 //==============================================================================
-//= Selection<IntervalMap>
-//==============================================================================
-template<class Type>
-typename enable_if<mpl::and_< is_interval_map<Type>
- , is_discrete<typename domain_type_of<Type>::type>
- >
- , typename Type::const_iterator>::type
-find(const Type& object, const typename domain_type_of<Type>::type& key_val)
-{
- typedef typename Type::const_iterator const_iterator;
- typedef typename Type::interval_type interval_type;
- return object.find(icl::unit_closure<interval_type>(key_val));
-}
-
-template<class Type>
-typename enable_if<mpl::and_< is_interval_map<Type>
- , is_continuous<typename domain_type_of<Type>::type>
- , has_dynamic_bounds<typename interval_type_of<Type>::type>
- >
- , typename Type::const_iterator>::type
-find(const Type& object, const typename domain_type_of<Type>::type& key_val)
-{
- typedef typename Type::const_iterator const_iterator;
- typedef typename Type::interval_type interval_type;
- return object.find(icl::singleton<interval_type>(key_val));
-}
-
-template<class Type>
-typename enable_if<mpl::and_< is_interval_map<Type>
- , is_continuous<typename domain_type_of<Type>::type>
- , has_static_bounds<typename interval_type_of<Type>::type>
- , boost::detail::is_incrementable<typename domain_type_of<Type>::type>
- >
- , typename Type::const_iterator>::type
-find(const Type& object, const typename domain_type_of<Type>::type& key_val)
-{
- typedef typename Type::const_iterator const_iterator;
- typedef typename Type::interval_type interval_type;
- const_iterator collision = object.find(icl::unit_closure<interval_type>(key_val));
- // A part of the cover(key_value)-interval may be found in the container, that
- // does not contain key_value. Therefore we have to check for its existence:
- return ( collision == object.end()
- || icl::contains(key_value<Type>(collision), key_val) )
- ? collision
- : object.end();
-}
-
-// NOTE: find(object, key) won't compile if key is of continuous type that does
-// not implement in(de)crementation (e.g. std::string).
-
-
-
-//==============================================================================
 //= Containedness<IntervalMap>
 //==============================================================================
 //------------------------------------------------------------------------------
@@ -101,7 +43,7 @@
 contains(const Type& super, const typename Type::element_type& key_value_pair)
 {
     typedef typename Type::const_iterator const_iterator;
- const_iterator it_ = icl::find(super, key_value_pair.key);
+ const_iterator it_ = icl::find(super, key_value_pair.key);
     return it_ != super.end() && it_->second == key_value_pair.data;
 }
 

Modified: trunk/boost/icl/concept/interval_set.hpp
==============================================================================
--- trunk/boost/icl/concept/interval_set.hpp (original)
+++ trunk/boost/icl/concept/interval_set.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -18,59 +18,6 @@
 {
 
 //==============================================================================
-//= Selection<IntervalSet>
-//==============================================================================
-template<class Type>
-typename enable_if<mpl::and_< is_interval_set<Type>
- , is_discrete<typename domain_type_of<Type>::type>
- >
- , typename Type::const_iterator>::type
-find(const Type& object, const typename domain_type_of<Type>::type& key_val)
-{
- typedef typename Type::const_iterator const_iterator;
- typedef typename Type::interval_type interval_type;
- return object.find(icl::unit_closure<interval_type>(key_val));
-}
-
-template<class Type>
-typename enable_if<mpl::and_< is_interval_set<Type>
- , is_continuous<typename domain_type_of<Type>::type>
- , has_dynamic_bounds<typename interval_type_of<Type>::type>
- >
- , typename Type::const_iterator>::type
-find(const Type& object, const typename domain_type_of<Type>::type& key_val)
-{
- typedef typename Type::const_iterator const_iterator;
- typedef typename Type::interval_type interval_type;
- return object.find(icl::singleton<interval_type>(key_val));
-}
-
-template<class Type>
-typename enable_if<mpl::and_< is_interval_set<Type>
- , is_continuous<typename domain_type_of<Type>::type>
- , has_static_bounds<typename interval_type_of<Type>::type>
- , boost::detail::is_incrementable<typename domain_type_of<Type>::type>
- >
- , typename Type::const_iterator>::type
-find(const Type& object, const typename domain_type_of<Type>::type& key_val)
-{
- typedef typename Type::const_iterator const_iterator;
- typedef typename Type::interval_type interval_type;
- const_iterator collision = object.find(icl::unit_closure<interval_type>(key_val));
- // A part of the cover(key_value)-interval may be found in the container, that
- // does not contain key_value. Therefore we have to check for its existence:
- return ( collision == object.end()
- || icl::contains(key_value<Type>(collision), key_val) )
- ? collision
- : object.end();
-}
-
-// NOTE: find(object, key) won't compile if key is of continuous type that does
-// not implement in(de)crementation (e.g. std::string).
-
-
-
-//==============================================================================
 //= Containedness<IntervalSet>
 //==============================================================================
 //------------------------------------------------------------------------------
@@ -80,7 +27,7 @@
 typename enable_if<is_interval_set<Type>, bool>::type
 contains(const Type& super, const typename Type::element_type& element)
 {
- return !(icl::find(super, element) == super.end());
+ return !(icl::find(super, element) == super.end());
 }
 
 template<class Type>
@@ -227,7 +174,7 @@
                  const typename Type::element_type& operand)
 {
     typedef typename Type::const_iterator const_iterator;
- const_iterator found = icl::find(object, operand);
+ const_iterator found = icl::find(object, operand);
     if(found != object.end())
         icl::add(section, operand);
 }

Modified: trunk/boost/icl/interval_base_map.hpp
==============================================================================
--- trunk/boost/icl/interval_base_map.hpp (original)
+++ trunk/boost/icl/interval_base_map.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -255,7 +255,7 @@
     /** Find the interval value pair, that contains \c key */
     const_iterator find(const domain_type& key_value)const
     {
- return icl::find(*this, key_value);
+ return icl::find(*this, key_value);
         //CL return _map.find(interval_type(key_value));
     }
 

Modified: trunk/boost/icl/interval_base_set.hpp
==============================================================================
--- trunk/boost/icl/interval_base_set.hpp (original)
+++ trunk/boost/icl/interval_base_set.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -204,7 +204,7 @@
     /** Find the interval, that contains element \c key_value */
     const_iterator find(const element_type& key_value)const
     {
- return icl::find(*this, key_value);
+ return icl::find(*this, key_value);
         //CL return this->_set.find(icl::singleton<segment_type>(key));
     }
 

Modified: trunk/libs/icl/test/Jamfile.v2
==============================================================================
--- trunk/libs/icl/test/Jamfile.v2 (original)
+++ trunk/libs/icl/test/Jamfile.v2 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -33,11 +33,10 @@
       
       # maps
       [ run fastest_interval_map_/fastest_interval_map.cpp ]
+ [ run fast_stat_interval_map_/fast_stat_interval_map.cpp
+ : : : : interval_map_right_open ]
       #[ run fast_stat_interval_map_/fast_stat_interval_map.cpp
- # : : : <define>BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS : interval_map_right_open ]
- #[ run fast_stat_interval_map_/fast_stat_interval_map.cpp
- # : : : <define>BOOST_ICL_DISCRETE_STATIC_INTERVAL_DEFAULT=left_open_interval
- # <define>BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT=left_open_interval
+ # : : : <define>BOOST_ICL_CONTINUOUS_STATIC_INTERVAL_DEFAULT=left_open_interval
       # : interval_map_left_open ]
       [ run fastest_interval_map_infix_/fastest_interval_map_infix.cpp ]
       [ run fastest_split_interval_map_/fastest_split_interval_map.cpp ]

Added: trunk/libs/icl/test/fast_stat_interval_map_/fast_stat_interval_map.cpp
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fast_stat_interval_map_/fast_stat_interval_map.cpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -0,0 +1,37 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2008-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#define BOOST_TEST_MODULE icl::interval_map unit test
+#include <libs/icl/test/disable_test_warnings.hpp>
+#include <string>
+#include <boost/mpl/list.hpp>
+#include "../unit_test_unwarned.hpp"
+
+#define BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+// interval instance types
+#include "../test_type_lists.hpp"
+#include "../test_value_maker.hpp"
+#include "../test_functions.hpp"
+
+#include <boost/icl/interval_map.hpp>
+#include <boost/icl/separate_interval_set.hpp>
+#include <boost/icl/split_interval_set.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace unit_test;
+using namespace boost::icl;
+
+// -----------------------------------------------------------------------------
+// test_interval_set_shared are tests that should give identical results for all
+// interval_sets: interval_set, separate_interval_set and split_interval_set.
+#include "../test_interval_map_shared.hpp"
+
+#define INTERVAL_MAP interval_map
+#include "../fast_stat_interval_map_cases.hpp"
+
+

Added: trunk/libs/icl/test/fast_stat_interval_map_/vc9_fast_stat_interval_map.vcproj
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fast_stat_interval_map_/vc9_fast_stat_interval_map.vcproj 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -0,0 +1,206 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_fast_stat_interval_map"
+ ProjectGUID="{EE61B7EF-EC45-4165-8B49-FD5B7D3A900D}"
+ RootNamespace="Fast_stat_interval_map"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/debug/$(ProjectName).exe"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release/"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release/"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="../../../../bin/release/$(ProjectName).exe"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath=".\fast_stat_interval_map.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\test_type_lists.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: trunk/libs/icl/test/fast_stat_interval_map_cases.hpp
==============================================================================
--- (empty file)
+++ trunk/libs/icl/test/fast_stat_interval_map_cases.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -0,0 +1,96 @@
+/*-----------------------------------------------------------------------------+
+Copyright (c) 2011-2011: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ICL_FAST_STAT_INTERVAL_MAP_CASES_HPP_JOFA_110301
+#define BOOST_ICL_FAST_STAT_INTERVAL_MAP_CASES_HPP_JOFA_110301
+
+/*
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_fundamentals_4_ordered_types)
+{ interval_map_fundamentals_4_ordered_types<INTERVAL_MAP, ordered_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_ctor_4_bicremental_types)
+{ interval_map_ctor_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_add_sub_4_bicremental_types)
+{ interval_map_add_sub_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_distinct_4_bicremental_types)
+{ interval_map_distinct_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_distinct_4_bicremental_continuous_types)
+{ interval_map_distinct_4_bicremental_continuous_types<INTERVAL_MAP, continuous_type_1, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_isolate_4_bicremental_continuous_types)
+{ interval_map_isolate_4_bicremental_continuous_types<INTERVAL_MAP, continuous_type_2, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_contains_4_bicremental_types)
+{ interval_map_contains_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_contains_key_objects_4_bicremental_types)
+{ interval_map_contains_key_objects_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_operators_4_bicremental_types)
+{ interval_map_operators_4_bicremental_types<INTERVAL_MAP, bicremental_type_5, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_base_intersect_4_bicremental_types)
+{ interval_map_base_intersect_4_bicremental_types<INTERVAL_MAP, bicremental_type_6, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_base_erase_4_bicremental_types)
+{ interval_map_base_erase_4_bicremental_types<INTERVAL_MAP, bicremental_type_7, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_base_is_disjoint_4_bicremental_types)
+{ interval_map_base_is_disjoint_4_bicremental_types<INTERVAL_MAP, bicremental_type_8, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_flip_4_bicremental_types)
+{ interval_map_flip_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+*/
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_find_4_bicremental_types)
+{ interval_map_find_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_find_4_numeric_continuous_types)
+{ interval_map_find_4_numeric_continuous_types<INTERVAL_MAP, double, int>();}
+
+/*
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_set_4_bicremental_types)
+{ interval_map_set_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_inclusion_compare_4_bicremental_types)
+{ interval_map_inclusion_compare_4_bicremental_types<discrete_type_4, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_std_copy_via_inserter_4_bicremental_types)
+{ interval_map_std_copy_via_inserter_4_bicremental_types<bicremental_type_4, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_element_iter_4_discrete_types)
+{ interval_map_element_iter_4_discrete_types<discrete_type_2, int, partial_absorber, INTERVAL_MAP>();}
+
+BOOST_AUTO_TEST_CASE
+(fastest_icl_interval_map_intersects_4_bicremental_types)
+{ interval_map_intersects_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+*/
+
+#endif // BOOST_ICL_FAST_STAT_INTERVAL_MAP_CASES_HPP_JOFA_110301
+

Modified: trunk/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp
==============================================================================
--- trunk/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp (original)
+++ trunk/libs/icl/test/fastest_icl_interval_/fastest_icl_interval.cpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -81,11 +81,6 @@
 (fastest_cover_left_open_interval_4_bicremental_types)
 { coverable_asymmetric_interval_4_bicremental_types<left_open_interval<numeric_continuous_type_3> >(); }
 
-//BOOST_AUTO_TEST_CASE
-//(fastest_cover_closed_interval_4_bicremental_types)
-//{ coverable_closed_interval_4_bicremental_types<closed_interval<numeric_continuous_type_2> >(); }
-
-
 //- dyn.dis --------------------------------------------------------------------
 BOOST_AUTO_TEST_CASE
 (fastest_itl_discrete_interval_ctor_4_discrete_types_base)

Modified: trunk/libs/icl/test/fastest_interval_map_cases.hpp
==============================================================================
--- trunk/libs/icl/test/fastest_interval_map_cases.hpp (original)
+++ trunk/libs/icl/test/fastest_interval_map_cases.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -14,7 +14,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_ctor_4_bicremental_types)
-{ interval_map_ctor_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, int>();}
+{ interval_map_ctor_4_bicremental_types<INTERVAL_MAP, bicremental_type_1, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_add_sub_4_bicremental_types)
@@ -22,7 +22,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_distinct_4_bicremental_types)
-{ interval_map_distinct_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, int>();}
+{ interval_map_distinct_4_bicremental_types<INTERVAL_MAP, bicremental_type_3, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_distinct_4_bicremental_continuous_types)
@@ -30,7 +30,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_isolate_4_bicremental_continuous_types)
-{ interval_map_isolate_4_bicremental_continuous_types<INTERVAL_MAP, continuous_type_2, int>();}
+{ interval_map_isolate_4_bicremental_continuous_types<INTERVAL_MAP, continuous_type_2, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_contains_4_bicremental_types)
@@ -38,7 +38,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_contains_key_objects_4_bicremental_types)
-{ interval_map_contains_key_objects_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, int>();}
+{ interval_map_contains_key_objects_4_bicremental_types<INTERVAL_MAP, bicremental_type_4, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_operators_4_bicremental_types)
@@ -46,7 +46,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_base_intersect_4_bicremental_types)
-{ interval_map_base_intersect_4_bicremental_types<INTERVAL_MAP, bicremental_type_6, int>();}
+{ interval_map_base_intersect_4_bicremental_types<INTERVAL_MAP, bicremental_type_6, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_base_erase_4_bicremental_types)
@@ -54,7 +54,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_base_is_disjoint_4_bicremental_types)
-{ interval_map_base_is_disjoint_4_bicremental_types<INTERVAL_MAP, bicremental_type_8, int>();}
+{ interval_map_base_is_disjoint_4_bicremental_types<INTERVAL_MAP, bicremental_type_8, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_flip_4_bicremental_types)
@@ -62,7 +62,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_find_4_bicremental_types)
-{ interval_map_find_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, int>();}
+{ interval_map_find_4_bicremental_types<INTERVAL_MAP, bicremental_type_2, double>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_set_4_bicremental_types)
@@ -70,7 +70,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_inclusion_compare_4_bicremental_types)
-{ interval_map_inclusion_compare_4_bicremental_types<discrete_type_4, int, partial_absorber, INTERVAL_MAP>();}
+{ interval_map_inclusion_compare_4_bicremental_types<discrete_type_4, double, partial_absorber, INTERVAL_MAP>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_std_copy_via_inserter_4_bicremental_types)
@@ -78,7 +78,7 @@
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_element_iter_4_discrete_types)
-{ interval_map_element_iter_4_discrete_types<discrete_type_2, int, partial_absorber, INTERVAL_MAP>();}
+{ interval_map_element_iter_4_discrete_types<discrete_type_2, double, partial_absorber, INTERVAL_MAP>();}
 
 BOOST_AUTO_TEST_CASE
 (fastest_icl_interval_map_intersects_4_bicremental_types)

Modified: trunk/libs/icl/test/test_casual_/test_casual.cpp
==============================================================================
--- trunk/libs/icl/test/test_casual_/test_casual.cpp (original)
+++ trunk/libs/icl/test/test_casual_/test_casual.cpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -43,24 +43,24 @@
     //typedef interval_set<T> IntervalSetT;
     //typedef IntervalMapT::interval_type IntervalT;
 
- /*
- int i;
- int j = int();
- chrono::duration<int> cd1 = chrono::duration<int>();
- chrono::duration<int> cd2(0);
- chrono::duration<int> dur1(0);
- chrono::duration<int> dur2, dur3, dur4;
- dur2 = dur3 = dur4 = dur1;
- int itg1(0);
- int itg2, itg3, itg4;
- itg2 = itg3 = itg4 = itg1;
+ /*
+ int i;
+ int j = int();
+ chrono::duration<int> cd1 = chrono::duration<int>();
+ chrono::duration<int> cd2(0);
+ chrono::duration<int> dur1(0);
+ chrono::duration<int> dur2, dur3, dur4;
+ dur2 = dur3 = dur4 = dur1;
+ int itg1(0);
+ int itg2, itg3, itg4;
+ itg2 = itg3 = itg4 = itg1;
 
- cout << "uninitialized i = " << i << endl;
- cout << "default constructed j = " << j << endl;
- cout << (cd1==cd2 ? "eq" : "!eq") << endl;
- cout << "chrono::duration cd1() = " << cd1 << endl;
- cout << "chrono::duration cd2(0) = " << cd2 << endl;
- */
+ cout << "uninitialized i = " << i << endl;
+ cout << "default constructed j = " << j << endl;
+ cout << (cd1==cd2 ? "eq" : "!eq") << endl;
+ cout << "chrono::duration cd1() = " << cd1 << endl;
+ cout << "chrono::duration cd2(0) = " << cd2 << endl;
+ */
 
     BOOST_CHECK_EQUAL(true, true);
 }

Modified: trunk/libs/icl/test/test_icl_interval.hpp
==============================================================================
--- trunk/libs/icl/test/test_icl_interval.hpp (original)
+++ trunk/libs/icl/test/test_icl_interval.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -98,8 +98,8 @@
     BOOST_CHECK( has_difference<T>::value );
 
     BOOST_CHECK_EQUAL( icl::contains(icl::unit_closure<IntervalT>(MK_v(4)), MK_v(4)), true );
- BOOST_CHECK_EQUAL( icl::length (icl::unit_closure<IntervalT>(MK_v(3))), d_1 );
- BOOST_CHECK ( icl::touches (icl::unit_closure<IntervalT>(MK_v(2)), icl::unit_closure<IntervalT>(MK_v(3))) );
+ BOOST_CHECK_EQUAL( icl::length (icl::unit_closure<IntervalT>(MK_v(3))), d_1 );
+ BOOST_CHECK ( icl::touches (icl::unit_closure<IntervalT>(MK_v(2)), icl::unit_closure<IntervalT>(MK_v(3))) );
 }
 
 

Modified: trunk/libs/icl/test/test_interval_map_shared.hpp
==============================================================================
--- trunk/libs/icl/test/test_interval_map_shared.hpp (original)
+++ trunk/libs/icl/test/test_interval_map_shared.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -35,7 +35,11 @@
     T v1 = unit_element<T>::value();
     IntervalT I0_0I(v0);
     IntervalT I1_1I(v1);
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
     IntervalT I0_1I(v0, v1, interval_bounds::closed());
+#else
+ IntervalT I0_1I = icl::interval<T>::closed(v0, v1);
+#endif
     U u1 = unit_element<U>::value();
 
     //-------------------------------------------------------------------------
@@ -246,14 +250,20 @@
     T v6 = make<T>(6);
     T v9 = make<T>(9);
     U u1 = make<U>(1);
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
     IntervalT I5_6I(v5,v6, interval_bounds::closed());
     IntervalT I5_9I(v5,v9, interval_bounds::closed());
     IntervalT I0_9I = IntervalT::closed(v0, v9);
+#else
+ IntervalT I5_6I = icl::interval<T>::closed(v5,v6);
+ IntervalT I5_9I = icl::interval<T>::closed(v5,v9);
+ IntervalT I0_9I = icl::interval<T>::closed(v0,v9);
+#endif
     typename IntervalMapT::domain_mapping_type v0_u1 = make_pair(v0, u1);
     typename IntervalMapT::domain_mapping_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(IntervalT::closed(v0, v9), u1);
+ typename IntervalMapT::value_type I0_9I_u1 = make_pair(icl::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) );
@@ -327,6 +337,8 @@
>
 void interval_map_distinct_4_bicremental_continuous_types()
 {
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
     typedef IntervalMap<T,U> IntervalMapT;
     typedef typename IntervalMapT::interval_type IntervalT;
     typedef typename IntervalMapT::size_type size_T;
@@ -347,11 +359,11 @@
     is_1_3_5.add(v1_u1).add(v3_u1).add(v5_u1);
 
     BOOST_CHECK_EQUAL( cardinality(is_1_3_5), s3 );
- BOOST_CHECK_EQUAL( is_1_3_5.size(), s3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.size(), s3 );
     icl::length(is_1_3_5);
- BOOST_CHECK_EQUAL( icl::length(is_1_3_5), d0 );
+ BOOST_CHECK_EQUAL( icl::length(is_1_3_5), d0 );
     BOOST_CHECK_EQUAL( interval_count(is_1_3_5), 3 );
- BOOST_CHECK_EQUAL( is_1_3_5.iterative_size(), 3 );
+ BOOST_CHECK_EQUAL( is_1_3_5.iterative_size(), 3 );
     BOOST_CHECK_EQUAL( iterative_size(is_1_3_5), 3 );
 
 
@@ -361,13 +373,14 @@
     //is_123_5 += make_pair(IntervalT::open(v1,v3),u1); //error C2593: 'operator +=' is ambiguous
     //is_123_5 += make_pair<IntervalT, U>(IntervalT::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(IntervalT::open(v1,v3),u1);
+ is_123_5 += typename IntervalMapT::value_type(icl::interval<T>::open(v1,v3),u1);
     //USASO: unsatisfctory solution 2: not implementing mapping_type version of o=
 
     BOOST_CHECK_EQUAL( cardinality(is_123_5), icl::infinity<size_T>::value() );
     BOOST_CHECK_EQUAL( is_123_5.size(), icl::infinity<size_T>::value() );
     BOOST_CHECK_EQUAL( icl::length(is_123_5), d2 );
 
+#endif //BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 }
 
 template
@@ -381,6 +394,8 @@
>
 void interval_map_isolate_4_bicremental_continuous_types()
 {
+#ifndef BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
+
     typedef IntervalMap<T,U> IntervalMapT;
     typedef typename IntervalMapT::interval_type IntervalT;
     typedef typename IntervalMapT::size_type size_T;
@@ -390,9 +405,9 @@
     T v2 = make<T>(2);
     T v4 = make<T>(4);
     U u1 = make<U>(1);
- IntervalT I0_4I = IntervalT::closed(v0,v4);
- IntervalT C0_2D = IntervalT::open(v0,v2);
- IntervalT C2_4D = IntervalT::open(v2,v4);
+ IntervalT I0_4I = icl::interval<T>::closed(v0,v4);
+ IntervalT C0_2D = icl::interval<T>::open(v0,v2);
+ IntervalT C2_4D = icl::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);
@@ -423,6 +438,7 @@
     BOOST_CHECK_EQUAL( iso_map, iso_map2 );
     BOOST_CHECK_EQUAL( iso_map, iso_map3 );
     BOOST_CHECK_EQUAL( iso_map, iso_map4 );
+#endif //BOOST_ICL_USE_STATIC_BOUNDED_INTERVALS
 }
 
 
@@ -440,7 +456,10 @@
     typedef IntervalMap<T,U> IntervalMapT;
     typedef typename IntervalMapT::interval_type IntervalT;
     typedef typename IntervalMapT::set_type IntervalSetT;
- IntervalMapT itv_map; itv_map.add(K_v(3,1));
+
+ IntervalMapT itv_map;
+ itv_map.add(K_v(3,1));
+
     BOOST_CHECK_EQUAL( icl::contains(itv_map, MK_v(3)), true );
     BOOST_CHECK_EQUAL( icl::contains(itv_map, K_v(3,1)), true );
 
@@ -531,10 +550,10 @@
     T v7 = make<T>(7);
     T v8 = make<T>(8);
     U u1 = make<U>(1);
- typename IntervalMapT::interval_type I3_5I(IntervalT::closed(v3,v5));
- typename IntervalMapT::value_type I0_1I_u1(IntervalT::closed(v0,v1),u1);
- typename IntervalMapT::value_type I3_5I_u1(IntervalT::closed(v3,v5),u1);
- typename IntervalMapT::value_type I7_8I_u1(IntervalT::closed(v7,v8),u1);
+ typename IntervalMapT::interval_type I3_5I(icl::interval<T>::closed(v3,v5));
+ typename IntervalMapT::value_type I0_1I_u1(icl::interval<T>::closed(v0,v1),u1);
+ typename IntervalMapT::value_type I3_5I_u1(icl::interval<T>::closed(v3,v5),u1);
+ typename IntervalMapT::value_type I7_8I_u1(icl::interval<T>::closed(v7,v8),u1);
     
     IntervalMapT left, left2, right, all, section, complement;
     left.add(I0_1I_u1).add(I3_5I_u1);
@@ -581,16 +600,16 @@
 
     U u1 = make<U>(1);
 
- IntervalT I0_3D = IntervalT::right_open(v0,v3);
- IntervalT I1_3D = IntervalT::right_open(v1,v3);
- IntervalT I1_4D = IntervalT::right_open(v1,v4);
- IntervalT I1_8D = IntervalT::right_open(v1,v8);
- IntervalT I2_7D = IntervalT::right_open(v2,v7);
- IntervalT I2_3D = IntervalT::right_open(v2,v3);
- IntervalT I5_8D = IntervalT::right_open(v5,v8);
- IntervalT I6_7D = IntervalT::right_open(v6,v7);
- IntervalT I6_8D = IntervalT::right_open(v6,v8);
- IntervalT I6_9D = IntervalT::right_open(v6,v9);
+ IntervalT I0_3D = icl::interval<T>::right_open(v0,v3);
+ IntervalT I1_3D = icl::interval<T>::right_open(v1,v3);
+ IntervalT I1_4D = icl::interval<T>::right_open(v1,v4);
+ IntervalT I1_8D = icl::interval<T>::right_open(v1,v8);
+ IntervalT I2_7D = icl::interval<T>::right_open(v2,v7);
+ IntervalT I2_3D = icl::interval<T>::right_open(v2,v3);
+ IntervalT I5_8D = icl::interval<T>::right_open(v5,v8);
+ IntervalT I6_7D = icl::interval<T>::right_open(v6,v7);
+ IntervalT I6_8D = icl::interval<T>::right_open(v6,v8);
+ IntervalT I6_9D = icl::interval<T>::right_open(v6,v9);
 
     typename IntervalMapT::value_type I0_3D_1(I0_3D, u1);
     typename IntervalMapT::value_type I6_9D_1(I6_9D, u1);
@@ -688,22 +707,22 @@
 
     U u1 = make<U>(1);
 
- IntervalT I0_1D = IntervalT::right_open(v0,v1);
- IntervalT I0_2D = IntervalT::right_open(v0,v2);
- IntervalT I0_3D = IntervalT::right_open(v0,v3);
- IntervalT I1_3D = IntervalT::right_open(v1,v3);
- IntervalT I1_4D = IntervalT::right_open(v1,v4);
- IntervalT I1_8D = IntervalT::right_open(v1,v8);
- IntervalT I2_4D = IntervalT::right_open(v2,v4);
- IntervalT I2_7D = IntervalT::right_open(v2,v7);
- IntervalT I2_3D = IntervalT::right_open(v2,v3);
- IntervalT I5_7D = IntervalT::right_open(v5,v7);
- IntervalT I5_8D = IntervalT::right_open(v5,v8);
- IntervalT I6_7D = IntervalT::right_open(v6,v7);
- IntervalT I6_8D = IntervalT::right_open(v6,v8);
- IntervalT I6_9D = IntervalT::right_open(v6,v9);
- IntervalT I7_9D = IntervalT::right_open(v7,v9);
- IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I0_1D = icl::interval<T>::right_open(v0,v1);
+ IntervalT I0_2D = icl::interval<T>::right_open(v0,v2);
+ IntervalT I0_3D = icl::interval<T>::right_open(v0,v3);
+ IntervalT I1_3D = icl::interval<T>::right_open(v1,v3);
+ IntervalT I1_4D = icl::interval<T>::right_open(v1,v4);
+ IntervalT I1_8D = icl::interval<T>::right_open(v1,v8);
+ IntervalT I2_4D = icl::interval<T>::right_open(v2,v4);
+ IntervalT I2_7D = icl::interval<T>::right_open(v2,v7);
+ IntervalT I2_3D = icl::interval<T>::right_open(v2,v3);
+ IntervalT I5_7D = icl::interval<T>::right_open(v5,v7);
+ IntervalT I5_8D = icl::interval<T>::right_open(v5,v8);
+ IntervalT I6_7D = icl::interval<T>::right_open(v6,v7);
+ IntervalT I6_8D = icl::interval<T>::right_open(v6,v8);
+ IntervalT I6_9D = icl::interval<T>::right_open(v6,v9);
+ IntervalT I7_9D = icl::interval<T>::right_open(v7,v9);
+ IntervalT I8_9D = icl::interval<T>::right_open(v8,v9);
 
     typename IntervalMapT::value_type I0_1D_1(I0_1D, u1);
     typename IntervalMapT::value_type I0_3D_1(I0_3D, u1);
@@ -805,12 +824,12 @@
 
     U u1 = make<U>(1);
 
- IntervalT I0_1D = IntervalT::right_open(v0,v1);
- IntervalT I1_3D = IntervalT::right_open(v1,v3);
- IntervalT I3_6D = IntervalT::right_open(v3,v6);
- IntervalT I5_7D = IntervalT::right_open(v5,v7);
- IntervalT I6_8D = IntervalT::right_open(v6,v8);
- IntervalT I8_9D = IntervalT::right_open(v8,v9);
+ IntervalT I0_1D = icl::interval<T>::right_open(v0,v1);
+ IntervalT I1_3D = icl::interval<T>::right_open(v1,v3);
+ IntervalT I3_6D = icl::interval<T>::right_open(v3,v6);
+ IntervalT I5_7D = icl::interval<T>::right_open(v5,v7);
+ IntervalT I6_8D = icl::interval<T>::right_open(v6,v8);
+ IntervalT I8_9D = icl::interval<T>::right_open(v8,v9);
 
     typename IntervalMapT::value_type I0_1D_1(I0_1D, u1);
     typename IntervalMapT::value_type I1_3D_1(I1_3D, u1);
@@ -1105,7 +1124,8 @@
 void interval_map_find_4_bicremental_types()
 {
     typedef IntervalMap<T,U> IntervalMapT;
- typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::const_iterator c_iterator;
 
     typename IntervalMapT::interval_mapping_type val_pair1 = IDv(6,9,1);
     std::pair<const IntervalT, U> val_pair2 = IDv(3,5,3);
@@ -1113,16 +1133,95 @@
 
     IntervalMapT map_a;
     map_a.add(CDv(1,3,1)).add(IDv(8,9,1)).add(IIv(6,11,3));
-
- typename IntervalMapT::const_iterator found = map_a.find(MK_v(6));
-
- BOOST_CHECK_EQUAL( found->second, MK_u(3) );
+ // {(1 3) [6 8)[8 9)[9 11)
+ // 1 3 4 3
+ // 5? 6?
+ c_iterator found1 = map_a.find(MK_v(6));
+ c_iterator found2 = icl::find(map_a, MK_v(6));
+
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK_EQUAL( found1->second, found2->second );
+ BOOST_CHECK_EQUAL( found1->second, MK_u(3) );
     BOOST_CHECK_EQUAL( map_a(MK_v(6)), MK_u(3) );
 
- found = map_a.find(MK_v(5));
+ found1 = map_a.find(MK_v(5));
 
- BOOST_CHECK_EQUAL( found == map_a.end(), true );
+ BOOST_CHECK_EQUAL( found1 == map_a.end(), true );
     BOOST_CHECK_EQUAL( map_a(MK_v(5)), MK_u(0) );
+ BOOST_CHECK_EQUAL( map_a(MK_v(8)), MK_u(4) );
+
+ //LAW map c; key k: k in dom(c) => contains(c, (k, find(c, k)->second))
+ BOOST_CHECK( icl::contains(map_a, K_v(2, icl::find(map_a, 2)->second)) );
+ BOOST_CHECK( icl::contains(map_a, K_v(11, map_a.find(11)->second)) );
+
+ BOOST_CHECK( icl::contains(map_a, 2) );
+ BOOST_CHECK( icl::contains(map_a, 10) );
+ BOOST_CHECK( !icl::contains(map_a, 1) );
+ BOOST_CHECK( !icl::contains(map_a, 3) );
+ BOOST_CHECK( !icl::contains(map_a, 12) );
+
+ BOOST_CHECK( icl::intersects(map_a, 2) );
+ BOOST_CHECK( icl::intersects(map_a, 10) );
+ BOOST_CHECK( !icl::intersects(map_a, 1) );
+ BOOST_CHECK( !icl::intersects(map_a, 3) );
+ BOOST_CHECK( !icl::intersects(map_a, 12) );
+}
+
+
+template
+<
+#if (defined(__GNUC__) && (__GNUC__ < 4)) //MEMO Can be simplified, if gcc-3.4 is obsolete
+ ICL_IntervalMap_TEMPLATE(T,U,Traits,partial_absorber) IntervalMap,
+#else
+ ICL_IntervalMap_TEMPLATE(_T,_U,Traits,partial_absorber) IntervalMap,
+#endif
+ class T, class U
+>
+void interval_map_find_4_numeric_continuous_types()
+{
+ typedef IntervalMap<T,U> IntervalMapT;
+ typedef typename IntervalMapT::interval_type IntervalT;
+ typedef typename IntervalMapT::const_iterator c_iterator;
+
+ T q_1_2 = MK_v(1) / MK_v(2);
+ T q_3_2 = MK_v(3) / MK_v(2);
+ T q_1_3 = MK_v(1) / MK_v(3);
+ T q_2_3 = MK_v(2) / MK_v(3);
+ T q_4_3 = MK_v(4) / MK_v(3);
+ T q_5_3 = MK_v(5) / MK_v(3);
+
+ IntervalMapT map_a;
+ map_a.add(MK_seg(IntervalT(q_1_3, q_2_3), 1)).add(MK_seg(IntervalT(q_4_3, q_5_3), 2));
+ // {[1/3 2/3) [4/3 5/3)}
+ // 1 2
+
+ c_iterator found1 = map_a.find(q_1_2);
+ c_iterator found2 = icl::find(map_a, q_1_2);
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK_EQUAL( found1->second, found2->second );
+ BOOST_CHECK_EQUAL( found1->second, MK_u(1) );
+
+ found1 = map_a.find(q_3_2);
+ found2 = icl::find(map_a, q_3_2);
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK_EQUAL( found1->second, found2->second );
+ BOOST_CHECK_EQUAL( found1->second, MK_u(2) );
+
+ found1 = map_a.find(MK_v(0));
+ found2 = icl::find(map_a, MK_v(0));
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK ( found1 == map_a.end() );
+
+ found1 = map_a.find(MK_v(1));
+ found2 = icl::find(map_a, MK_v(1));
+ BOOST_CHECK ( found1 == found2 );
+ BOOST_CHECK ( found1 == map_a.end() );
+
+ BOOST_CHECK( !icl::contains(map_a, MK_v(0)) );
+ BOOST_CHECK( icl::contains(map_a, q_1_2) );
+ BOOST_CHECK( !icl::contains(map_a, MK_v(1)) );
+ BOOST_CHECK( icl::contains(map_a, q_3_2) );
+ BOOST_CHECK( !icl::contains(map_a, MK_v(2)) );
 }
 
 

Modified: trunk/libs/icl/test/test_type_lists.hpp
==============================================================================
--- trunk/libs/icl/test/test_type_lists.hpp (original)
+++ trunk/libs/icl/test/test_type_lists.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -51,8 +51,8 @@
     ,boost::rational<boost::xint::integer>
 #endif
 #ifdef BOOST_ICL_TEST_CHRONO
- ,boost::chrono::duration<int>
- ,boost::chrono::duration<double>
+ ,boost::chrono::duration<int>
+ ,boost::chrono::duration<double>
 #endif
     ,boost_posix_time_ptime
     ,boost_posix_time_duration
@@ -80,8 +80,8 @@
     ,boost::rational<boost::xint::integer>
 #endif
 #ifdef BOOST_ICL_TEST_CHRONO
- ,boost::chrono::duration<int>
- ,boost::chrono::duration<float>
+ ,boost::chrono::duration<int>
+ ,boost::chrono::duration<float>
 #endif
> signed_bicremental_types;
 
@@ -103,7 +103,7 @@
     ,boost::rational<boost::xint::integer>
 #endif
 #ifdef BOOST_ICL_TEST_CHRONO
- ,boost::chrono::duration<double>
+ ,boost::chrono::duration<double>
 #endif
> bicremental_continuous_types;
 
@@ -134,7 +134,7 @@
     ,boost::xint::integer
 #endif
 #ifdef BOOST_ICL_TEST_CHRONO
- ,boost::chrono::duration<unsigned short>
+ ,boost::chrono::duration<unsigned short>
 #endif
     ,boost_posix_time_ptime
     ,boost_posix_time_ptime
@@ -165,7 +165,7 @@
     ,boost::rational<boost::xint::integer>
 #endif
 #ifdef BOOST_ICL_TEST_CHRONO
- ,boost::chrono::duration<long double>
+ ,boost::chrono::duration<long double>
 #endif
> numeric_continuous_types;
 
@@ -181,7 +181,7 @@
     ,boost::rational<boost::xint::integer>
 #endif
 #ifdef BOOST_ICL_TEST_CHRONO
- ,boost::chrono::duration<double>
+ ,boost::chrono::duration<double>
 #endif
     ,std::string
> continuous_types;
@@ -201,8 +201,8 @@
     ,boost::xint::integer
 #endif
 #ifdef BOOST_ICL_TEST_CHRONO
- ,boost::chrono::duration<short>
- ,boost::chrono::duration<long double>
+ ,boost::chrono::duration<short>
+ ,boost::chrono::duration<long double>
 #endif
     ,boost_posix_time_ptime
     ,boost_posix_time_duration

Modified: trunk/libs/icl/test/test_value_maker.hpp
==============================================================================
--- trunk/libs/icl/test/test_value_maker.hpp (original)
+++ trunk/libs/icl/test/test_value_maker.hpp 2011-03-01 17:51:00 EST (Tue, 01 Mar 2011)
@@ -133,6 +133,12 @@
     typedef typename ItvMapT::domain_mapping_type domain_mapping_type;
     typedef std::pair<domain_type, codomain_type> std_pair_type;
 
+ static segment_type mk_segment(const interval_type& inter_val, int val)
+ {
+ return segment_type(inter_val, test_value<codomain_type>::make(val));
+ }
+
+ /*CL?
     static interval_type interval_(int lower, int upper, int bounds = 2)
     {
         return interval_type(test_value<domain_type>::make(lower),
@@ -145,6 +151,7 @@
         return segment_type( interval_(lower, upper, static_cast<bound_type>(bounds)),
                              test_value<codomain_type>::make(val) );
     }
+ */
 
     static domain_mapping_type map_pair(int key, int val)
     {
@@ -178,13 +185,15 @@
 
 // Very short value denotation for interval value pairs
 // Assumption typename IntervalMapT existes in scope
-#define IIv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_closed)
-#define IDv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_right_open)
-#define CIv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_left_open)
-#define CDv(low,up,val) map_val<IntervalMapT>::val_pair(low,up,val, interval_bounds::_open)
+#define IIv(low,up,val) map_val<IntervalMapT>::mk_segment(I_I(low,up), val)
+#define IDv(low,up,val) map_val<IntervalMapT>::mk_segment(I_D(low,up), val)
+#define CIv(low,up,val) map_val<IntervalMapT>::mk_segment(C_I(low,up), val)
+#define CDv(low,up,val) map_val<IntervalMapT>::mk_segment(C_D(low,up), val)
 #define K_v(key,val) map_val<IntervalMapT>::map_pair(key,val)
 #define sK_v(key,val) map_val<IntervalMapT>::std_pair(key,val)
 
+#define MK_seg(itv,val) map_val<IntervalMapT>::mk_segment(itv, val)
+
 
 }} // namespace boost icl
 


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