Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:38:19

0001 /*-----------------------------------------------------------------------------+    
0002 Copyright (c) 2010-2010: Joachim Faulhaber
0003 +------------------------------------------------------------------------------+
0004    Distributed under the Boost Software License, Version 1.0.
0005       (See accompanying file LICENCE.txt or copy at
0006            http://www.boost.org/LICENSE_1_0.txt)
0007 +-----------------------------------------------------------------------------*/
0008 #ifndef BOOST_ICL_CONCEPT_JOINABLE_HPP_JOFA_100920
0009 #define BOOST_ICL_CONCEPT_JOINABLE_HPP_JOFA_100920
0010 
0011 #include <boost/icl/type_traits/is_interval_container.hpp>
0012 #include <boost/icl/concept/interval.hpp>
0013 
0014 namespace boost{ namespace icl
0015 {
0016 
0017 namespace segmental
0018 {
0019     template<class Type>
0020     typename enable_if<is_interval_set<Type>, bool>::type
0021     is_joinable(typename Type::iterator it_, typename Type::iterator next_, Type* = 0)
0022     {
0023         return touches(*it_, *next_);
0024     }
0025 
0026     template<class Type>
0027     typename enable_if<is_interval_map<Type>, bool>::type
0028     is_joinable(typename Type::iterator it_, typename Type::iterator next_, Type* = 0)
0029     {
0030         return touches((*it_).first, (*next_).first)
0031             && (*it_).second == (*next_).second    ;
0032     }
0033 }
0034 
0035 
0036 
0037 }} // namespace boost icl
0038 
0039 #endif
0040 
0041