diff options
author | bugaevskiy <bugaevskiy@yandex-team.com> | 2022-08-25 04:02:04 +0300 |
---|---|---|
committer | bugaevskiy <bugaevskiy@yandex-team.com> | 2022-08-25 04:02:04 +0300 |
commit | 25270694776a35000bcb18c5302b1ad1ba9b87a8 (patch) | |
tree | b2324a93c720fb45d0316fd3c631620e89d6604f | |
parent | fed4782791d951fd834c5d9f7be29f408486af1d (diff) | |
download | ydb-25270694776a35000bcb18c5302b1ad1ba9b87a8.tar.gz |
Reimport boost/icl as a separate project
118 files changed, 36 insertions, 5979 deletions
diff --git a/CMakeLists.darwin.txt b/CMakeLists.darwin.txt index 7195d142d55..c55bc4077e2 100644 --- a/CMakeLists.darwin.txt +++ b/CMakeLists.darwin.txt @@ -975,6 +975,7 @@ add_subdirectory(ydb/library/yql/udfs/common/json2) add_subdirectory(ydb/library/yql/minikql/jsonpath) add_subdirectory(library/cpp/regex/hyperscan) add_subdirectory(contrib/libs/hyperscan) +add_subdirectory(contrib/restricted/boost/icl) add_subdirectory(contrib/restricted/boost/libs/graph) add_subdirectory(contrib/restricted/boost/filesystem) add_subdirectory(contrib/libs/hyperscan/runtime_core2) diff --git a/CMakeLists.linux.txt b/CMakeLists.linux.txt index d8532e17e82..325b788019c 100644 --- a/CMakeLists.linux.txt +++ b/CMakeLists.linux.txt @@ -974,6 +974,7 @@ add_subdirectory(library/cpp/hyperloglog) add_subdirectory(ydb/library/yql/udfs/common/hyperscan) add_subdirectory(library/cpp/regex/hyperscan) add_subdirectory(contrib/libs/hyperscan) +add_subdirectory(contrib/restricted/boost/icl) add_subdirectory(contrib/restricted/boost/libs/graph) add_subdirectory(contrib/restricted/boost/filesystem) add_subdirectory(contrib/libs/hyperscan/runtime_core2) diff --git a/contrib/libs/hyperscan/CMakeLists.txt b/contrib/libs/hyperscan/CMakeLists.txt index df099961627..28d84c14f12 100644 --- a/contrib/libs/hyperscan/CMakeLists.txt +++ b/contrib/libs/hyperscan/CMakeLists.txt @@ -20,6 +20,7 @@ target_include_directories(contrib-libs-hyperscan PRIVATE target_link_libraries(contrib-libs-hyperscan PUBLIC contrib-libs-cxxsupp contrib-restricted-boost + restricted-boost-icl boost-libs-graph ) target_sources(contrib-libs-hyperscan PRIVATE diff --git a/contrib/restricted/boost/boost/icl/associative_element_container.hpp b/contrib/restricted/boost/boost/icl/associative_element_container.hpp deleted file mode 100644 index 0f54e54a1f2..00000000000 --- a/contrib/restricted/boost/boost/icl/associative_element_container.hpp +++ /dev/null @@ -1,20 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_101023 -#define BOOST_ICL_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_101023 - -#include <boost/icl/detail/map_algo.hpp> -#include <boost/icl/concept/comparable.hpp> -#include <boost/icl/concept/container.hpp> -#include <boost/icl/concept/element_set.hpp> -#include <boost/icl/concept/element_map.hpp> -#include <boost/icl/concept/element_associator.hpp> - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/concept/element_associator.hpp b/contrib/restricted/boost/boost/icl/concept/element_associator.hpp deleted file mode 100644 index ce421e018cf..00000000000 --- a/contrib/restricted/boost/boost/icl/concept/element_associator.hpp +++ /dev/null @@ -1,506 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_ELEMENT_ASSOCIATOR_HPP_JOFA_100921 -#define BOOST_ICL_CONCEPT_ELEMENT_ASSOCIATOR_HPP_JOFA_100921 - -#include <boost/config.hpp> -#include <boost/icl/type_traits/is_associative_element_container.hpp> -#include <boost/icl/type_traits/is_key_container_of.hpp> -#include <boost/icl/type_traits/is_combinable.hpp> -#include <boost/icl/detail/subset_comparer.hpp> -#include <boost/icl/concept/element_set.hpp> -#include <boost/icl/concept/element_map.hpp> - -namespace boost{ namespace icl -{ - -//============================================================================== -//= Size -//============================================================================== -template<class Type> -typename enable_if<is_element_container<Type>, std::size_t>::type -iterative_size(const Type& object) -{ - return object.size(); -} - -template<class Type> -typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type -size(const Type& object) -{ - return icl::iterative_size(object); -} - -template<class Type> -typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type -cardinality(const Type& object) -{ - return icl::iterative_size(object); -} - - -//============================================================================== -//= Containedness<ElementSet|ElementMap> -//============================================================================== -//------------------------------------------------------------------------------ -//- bool within(c P&, c T&) T:{s}|{m} P:{e}|{i} fragment_types|key_types -//------------------------------------------------------------------------------ -/** Checks if a key is in the associative container */ -template<class Type> -typename enable_if<is_associative_element_container<Type>, bool>::type -within(const typename Type::key_type& key, const Type& super) -{ - return !(super.find(key) == super.end()); -} - -//------------------------------------------------------------------------------ -//- bool within(c P&, c T&) T:{s}|{m} P:{s'} fragment_types|key_types -//------------------------------------------------------------------------------ -template<class SubT, class SuperT> -typename enable_if<mpl::and_< is_associative_element_container<SuperT> - , is_key_container_of<SubT, SuperT> >, - bool>::type -within(const SubT& sub, const SuperT& super) -{ - if(icl::is_empty(sub)) return true; - if(icl::is_empty(super)) return false; - if(icl::size(super) < icl::size(sub)) return false; - - typename SubT::const_iterator common_lwb_; - typename SubT::const_iterator common_upb_; - if(!Set::common_range(common_lwb_, common_upb_, sub, super)) - return false; - - typename SubT::const_iterator sub_ = sub.begin(); - typename SuperT::const_iterator super_; - while(sub_ != sub.end()) - { - super_ = super.find(key_value<SubT>(sub_)); - if(super_ == super.end()) - return false; - else if(!co_equal(sub_, super_, &sub, &super)) - return false; - - ++sub_; - } - return true; -} - -//------------------------------------------------------------------------------ -//- bool contains(c T&, c P&) T:{s}|{m} P:{e}|{i} fragment_types|key_types -//------------------------------------------------------------------------------ -template<class Type> -typename enable_if<is_associative_element_container<Type>, bool>::type -contains(const Type& super, const typename Type::key_type& key) -{ - return icl::within(key, super); -} - -//------------------------------------------------------------------------------ -//- bool contains(c T&, c P&) T:{s}|{m} P:{s'} fragment_types|key_types -//------------------------------------------------------------------------------ -template<class SubT, class SuperT> -typename enable_if<mpl::and_< is_associative_element_container<SuperT> - , is_key_container_of<SubT, SuperT> >, - bool>::type -contains(const SuperT& super, const SubT& sub) -{ - return icl::within(sub, super); -} - -//============================================================================== -//= Equivalences and Orderings -//============================================================================== - -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4996) //'std::equal': Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' -#endif // I do guarantee here that I am using the parameters correctly :) - -/** Standard equality, which is lexicographical equality of the sets - as sequences, that are given by their Compare order. */ -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, bool>::type -operator == (const Type& left, const Type& right) -{ - return left.size() == right.size() - && std::equal(left.begin(), left.end(), right.begin()); -} - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, bool>::type -is_element_equal(const Type& left, const Type& right) -{ return left == right; } - - -/* Strict weak less ordering which is given by the Compare order */ -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, bool>::type -operator < (const Type& left, const Type& right) -{ - return std::lexicographical_compare( - left.begin(), left.end(), right.begin(), right.end(), - typename Type::element_compare() - ); -} - -template<class LeftT, class RightT> -typename enable_if<is_concept_equivalent<is_element_container,LeftT, RightT>, - int>::type -inclusion_compare(const LeftT& left, const RightT& right) -{ - return Set::subset_compare(left, right, - left.begin(), left.end(), - right.begin(), right.end()); -} - -//============================================================================== -//= Addition -//============================================================================== -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -operator += (Type& object, const typename Type::value_type& operand) -{ - return icl::add(object, operand); -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator + (Type object, const typename Type::value_type& operand) -{ - return object += operand; -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator + (const typename Type::value_type& operand, Type object) -{ - return object += operand; -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -operator += (Type& object, const Type& operand) -{ - if(&object == &operand) - return object; - - typename Type::iterator prior_ = object.end(); - ICL_const_FORALL(typename Type, it_, operand) - prior_ = icl::add(object, prior_, *it_); - - return object; -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator + (Type object, const Type& operand) -{ - return object += operand; -} - -//============================================================================== -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -operator |= (Type& object, const typename Type::value_type& operand) -{ - return icl::add(object, operand); -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator | (Type object, const typename Type::value_type& operand) -{ - return object += operand; -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator | (const typename Type::value_type& operand, Type object) -{ - return object += operand; -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -operator |= (Type& object, const Type& operand) -{ - return object += operand; -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator | (Type object, const Type& operand) -{ - return object += operand; -} - - -//============================================================================== -//= Insertion -//============================================================================== -//------------------------------------------------------------------------------ -//- V insert(T&, c P&) T:{s}|{m} P:{e}|{b} fragment_type -//------------------------------------------------------------------------------ -template<class Type> -typename enable_if<is_associative_element_container<Type>, - std::pair<typename Type::iterator,bool> >::type -insert(Type& object, const typename Type::value_type& operand) -{ - return object.insert(operand); -} - -template<class Type> -typename enable_if<is_associative_element_container<Type>, - typename Type::iterator>::type -insert(Type& object, typename Type::iterator prior, - const typename Type::value_type& operand) -{ - return object.insert(prior, operand); -} - -//------------------------------------------------------------------------------ -//- T insert(T&, c T&) T:{s m} map fragment_type -//------------------------------------------------------------------------------ -template<class Type> -typename enable_if<is_associative_element_container<Type>, Type>::type& -insert(Type& object, const Type& addend) -{ - typedef typename Type::iterator iterator; - - iterator prior_ = object.end(); - ICL_const_FORALL(typename Type, elem_, addend) - icl::insert(object, prior_, *elem_); - - return object; -} - - -//============================================================================== -//= Erasure -//============================================================================== -template<class Type> -typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type -erase(Type& object, const typename Type::key_type& key_value) -{ - typedef typename Type::size_type size_type; - typename Type::iterator it_ = object.find(key_value); - if(it_ != object.end()) - { - object.erase(it_); - return unit_element<size_type>::value(); - } - return identity_element<size_type>::value(); -} - -template<class Type> -typename enable_if<is_associative_element_container<Type>, Type>::type& -erase(Type& object, const Type& erasure) -{ - ICL_const_FORALL(typename Type, elem_, erasure) - icl::erase(object, *elem_); - - return object; -} - - - -//============================================================================== -//= Subtraction<ElementSet|ElementMap> -//============================================================================== -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -operator -= (Type& object, const typename Type::value_type& operand) -{ - return icl::subtract(object, operand); -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator - (Type object, const typename Type::value_type& operand) -{ - return object -= operand; -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -operator -= (Type& object, const Type& subtrahend) -{ - ICL_const_FORALL(typename Type, it_, subtrahend) - icl::subtract(object, *it_); - - return object; -} - -template <class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator - (Type object, const Type& subtrahend) -{ - return object -= subtrahend; -} - - -//============================================================================== -//= Intersection -//============================================================================== -//------------------------------------------------------------------------------ -//- void add_intersection(T&, c T&, c P&) T:{s}{m} P:{e}{e} key_type -//------------------------------------------------------------------------------ -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, void>::type -add_intersection(Type& section, const Type& object, - const typename Type::key_type& operand) -{ - typedef typename Type::const_iterator const_iterator; - const_iterator it_ = object.find(operand); - if(it_ != object.end()) - icl::add(section, *it_); -} - -//------------------------------------------------------------------------------ -//- void add_intersection(T&, c T&, c P&) T:{s}{m} P:{s}{s} set key_type -//------------------------------------------------------------------------------ -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, void>::type -add_intersection(Type& section, const Type& object, - const typename key_container_type_of<Type>::type& operand) -{ - typedef typename key_container_type_of<Type>::type key_container_type; - typedef typename key_container_type::const_iterator const_iterator; - const_iterator common_lwb_, common_upb_; - if(!Set::common_range(common_lwb_, common_upb_, operand, object)) - return; - - const_iterator sec_ = common_lwb_; - while(sec_ != common_upb_) - add_intersection(section, object, *sec_++); -} - -//------------------------------------------------------------------------------ -//- Intersection<ElementMap|ElementSet> -//------------------------------------------------------------------------------ -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -operator &= (Type& object, const typename Type::key_type& operand) -{ - Type section; - add_intersection(section, object, operand); - object.swap(section); - return object; -} - -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator & (Type object, const typename Type::key_type& operand) -{ - return object &= operand; -} - -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator & (const typename Type::key_type& operand, Type object) -{ - return object &= operand; -} - -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -operator &= (Type& object, const typename key_container_type_of<Type>::type& operand) -{ - Type section; - add_intersection(section, object, operand); - object.swap(section); - return object; -} - -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator & (Type object, const Type& operand) -{ - return object &= operand; -} -//------------------------------------------------------------------------------ - -template<class Type, class CoType> -inline typename enable_if<is_associative_element_container<Type>, bool>::type -disjoint(const Type& left, const Type& right) -{ - return !intersects(left, right); -} - -//============================================================================== -//= Symmetric difference<ElementSet|ElementMap> -//============================================================================== -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator ^ (Type object, const typename Type::value_type& operand) -{ - return icl::flip(object, operand); -} - -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator ^ (const typename Type::value_type& operand, Type object) -{ - return icl::flip(object, operand); -} - -template<class Type> -inline typename enable_if<is_associative_element_container<Type>, Type>::type -operator ^ (Type object, const Type& operand) -{ - return object ^= operand; -} - - -//============================================================================== -//= Manipulation by predicates -//============================================================================== -template<class Type, class Predicate> -typename enable_if<is_associative_element_container<Type>, Type>::type& -erase_if(const Predicate& pred, Type& object) -{ - typename Type::iterator it_ = object.begin(); - while(it_ != object.end()) - if(pred(*it_)) - icl::erase(object, it_++); - else ++it_; - return object; -} - -template<class Type, class Predicate> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -add_if(const Predicate& pred, Type& object, const Type& src) -{ - typename Type::const_iterator it_ = src.begin(); - while(it_ != src.end()) - if(pred(*it_)) - icl::add(object, *it_++); - - return object; -} - -template<class Type, class Predicate> -inline typename enable_if<is_associative_element_container<Type>, Type>::type& -assign_if(const Predicate& pred, Type& object, const Type& src) -{ - icl::clear(object); - return add_if(object, src, pred); -} - - - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/concept/element_map.hpp b/contrib/restricted/boost/boost/icl/concept/element_map.hpp deleted file mode 100644 index b2d78abbed5..00000000000 --- a/contrib/restricted/boost/boost/icl/concept/element_map.hpp +++ /dev/null @@ -1,481 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_ELEMENT_MAP_HPP_JOFA_100921 -#define BOOST_ICL_CONCEPT_ELEMENT_MAP_HPP_JOFA_100921 - -#include <boost/mpl/and.hpp> -#include <boost/mpl/not.hpp> -#include <boost/icl/detail/on_absorbtion.hpp> -#include <boost/icl/type_traits/unit_element.hpp> -#include <boost/icl/type_traits/is_total.hpp> -#include <boost/icl/type_traits/absorbs_identities.hpp> -#include <boost/icl/type_traits/is_associative_element_container.hpp> -#include <boost/icl/type_traits/is_combinable.hpp> - -#include <boost/icl/concept/map_value.hpp> -#include <boost/icl/detail/map_algo.hpp> - - -namespace boost{ namespace icl -{ - -//NOTE: Some forward declarations are needed by some compilers. -template<class Type, class Predicate> -typename enable_if<is_associative_element_container<Type>, Type>::type& -erase_if(const Predicate& pred, Type& object); - - -//============================================================================== -//= Containedness<ElementMap> -//============================================================================== -//------------------------------------------------------------------------------ -//- bool within(c P&, c T&) T:{m} P:{b} fragment_types -//------------------------------------------------------------------------------ -/** Checks if a key-value pair is in the map */ -template<class Type> -typename enable_if<is_element_map<Type>, bool>::type -within(const typename Type::element_type& value_pair, const Type& super) -{ - typedef typename Type::const_iterator const_iterator; - const_iterator found_ = super.find(value_pair.first); - return found_ != super.end() && (*found_).second == value_pair.second; -} - -//------------------------------------------------------------------------------ -//- bool contains(c T&, c P&) T:{m} P:{b} fragment_types -//------------------------------------------------------------------------------ -template<class Type> -typename enable_if<is_element_map<Type>, bool>::type -contains(const Type& super, const typename Type::element_type& value_pair) -{ - return icl::within(value_pair, super); -} - -//============================================================================== -//= Equivalences and Orderings<ElementMap> -//============================================================================== - -/** Protonic equality is equality on all elements that do not carry an identity element as content. */ -template<class Type> -inline typename enable_if<is_element_map<Type>, bool>::type -is_distinct_equal(const Type& lhs, const Type& rhs) -{ - return Map::lexicographical_distinct_equal(lhs, rhs); -} - -//============================================================================== -//= Addition<ElementMap> -//============================================================================== -/** \c add inserts \c value_pair into the map if it's key does - not exist in the map. - If \c value_pairs's key value exists in the map, it's data - value is added to the data value already found in the map. */ -template <class Type> -typename enable_if<is_element_map<Type>, Type>::type& -add(Type& object, const typename Type::value_type& value_pair) -{ - return object.add(value_pair); -} - -/** \c add add \c value_pair into the map using \c prior as a hint to - insert \c value_pair after the position \c prior is pointing to. */ -template <class Type> -typename enable_if<is_element_map<Type>, typename Type::iterator>::type -add(Type& object, typename Type::iterator prior, - const typename Type::value_type& value_pair) -{ - return object.add(prior, value_pair); -} - -//============================================================================== -//= Erasure -//============================================================================== -//------------------------------------------------------------------------------ -//- T& erase(T&, c P&) T:{m} P:{b} fragment_type -//------------------------------------------------------------------------------ -template <class Type> -typename enable_if<is_element_map<Type>, typename Type::size_type>::type -erase(Type& object, const typename Type::element_type& value_pair) -{ - typedef typename Type::size_type size_type; - typedef typename Type::iterator iterator; - typedef typename Type::on_identity_absorbtion on_identity_absorbtion; - - if(on_identity_absorbtion::is_absorbable(value_pair.second)) - return identity_element<size_type>::value(); - - iterator it_ = object.find(value_pair.first); - if(it_ != object.end() && value_pair.second == (*it_).second) - { - object.erase(it_); - return unit_element<size_type>::value(); - } - - return identity_element<size_type>::value(); -} - -template<class Type> -typename enable_if<is_element_map<Type>, Type>::type& -erase(Type& object, const typename Type::set_type& erasure) -{ - typedef typename Type::set_type set_type; - ICL_const_FORALL(typename set_type, elem_, erasure) - icl::erase(object, *elem_); - - return object; -} - -//============================================================================== -//= Subtraction -//============================================================================== -//------------------------------------------------------------------------------ -//- T& subtract(T&, c P&) T:{m} P:{b} fragment_type -//------------------------------------------------------------------------------ -template <class Type> -inline typename enable_if<is_element_map<Type>, Type>::type& -subtract(Type& object, const typename Type::element_type& operand) -{ - return object.subtract(operand); -} - -//------------------------------------------------------------------------------ -//- T& subtract(T&, c P&) T:{m} P:{e} key_type -//------------------------------------------------------------------------------ -template <class Type> -typename enable_if<is_element_map<Type>, Type>::type& -subtract(Type& object, const typename Type::domain_type& key_value) -{ - return icl::erase(object, key_value); -} - -//------------------------------------------------------------------------------ -//- T& subtract(T&, c P&) T:{m} P:{s} set key_type -//------------------------------------------------------------------------------ -template <class Type> -inline typename enable_if<is_element_map<Type>, Type>::type& -operator -= (Type& object, const typename Type::set_type& operand) -{ - typedef typename Type::set_type set_type; - typedef typename set_type::const_iterator co_iterator; - typedef typename Type::iterator iterator; - - co_iterator common_lwb_, common_upb_; - if(!Set::common_range(common_lwb_, common_upb_, operand, object)) - return object; - - co_iterator it_ = common_lwb_; - iterator common_; - - while(it_ != common_upb_) - object.erase(*it_++); - - return object; -} - -template <class Type> -inline typename enable_if<is_element_map<Type>, Type>::type -operator - (Type object, const typename Type::set_type& subtrahend) -{ - return object -= subtrahend; -} - -//============================================================================== -//= Selective Update<ElementMap> -//============================================================================== -//------------------------------------------------------------------------------ -//- T& set_at(T&, c P&) T:{m} P:{b} -//------------------------------------------------------------------------------ -template<class Type> -inline typename enable_if<is_element_map<Type>, Type>::type& -set_at(Type& object, const typename Type::element_type& operand) -{ - typedef typename Type::iterator iterator; - typedef typename Type::codomain_combine codomain_combine; - typedef on_absorbtion<Type,codomain_combine,absorbs_identities<Type>::value> - on_identity_absorbtion; - - if(!on_identity_absorbtion::is_absorbable(operand.second)) - { - std::pair<iterator,bool> insertion = object.insert(operand); - if(!insertion.second) - insertion->second = operand.second; - } - return object; -} - - -//============================================================================== -//= Intersection -//============================================================================== -template<class Type> -inline typename enable_if<is_element_map<Type>, void>::type -add_intersection(Type& section, const Type& object, - const typename Type::element_type& operand) -{ - object.add_intersection(section, operand); -} - -template<class Type> -inline typename enable_if<is_element_map<Type>, void>::type -add_intersection(Type& section, const Type& object, const Type& operand) -{ - ICL_const_FORALL(typename Type, it_, operand) - icl::add_intersection(section, object, *it_); -} - -//------------------------------------------------------------------------------ -//- T& op &=(T&, c P&) T:{m} P:{b m} fragment_types -//------------------------------------------------------------------------------ - -template<class Type> -inline typename enable_if<mpl::and_<is_element_map<Type>, is_total<Type> >, Type>::type& -operator &=(Type& object, const typename Type::element_type& operand) -{ - object.add(operand); - return object; -} - -template<class Type> -inline typename enable_if<mpl::and_<is_element_map<Type>, mpl::not_<is_total<Type> > >, Type>::type& -operator &=(Type& object, const typename Type::element_type& operand) -{ - Type section; - icl::add_intersection(section, object, operand); - object.swap(section); - return object; -} - -template<class Type> -inline typename enable_if<is_element_map<Type>, Type>::type -operator & (Type object, const typename Type::element_type& operand) -{ - return object &= operand; -} - -template<class Type> -inline typename enable_if<is_element_map<Type>, Type>::type -operator & (const typename Type::element_type& operand, Type object) -{ - return object &= operand; -} - - -template<class Type> -inline typename enable_if<mpl::and_<is_element_map<Type>, is_total<Type> >, Type>::type& -operator &=(Type& object, const Type& operand) -{ - object += operand; - return object; -} - -template<class Type> -inline typename enable_if<mpl::and_<is_element_map<Type>, mpl::not_<is_total<Type> > >, Type>::type& -operator &=(Type& object, const Type& operand) -{ - Type section; - icl::add_intersection(section, object, operand); - object.swap(section); - return object; -} - -template<class Type> -inline typename enable_if<is_element_map<Type>, Type>::type -operator & (Type object, const typename Type::key_object_type& operand) -{ - return object &= operand; -} - -template<class Type> -inline typename enable_if<is_element_map<Type>, Type>::type -operator & (const typename Type::key_object_type& operand, Type object) -{ - return object &= operand; -} - -//============================================================================== -//= Intersection<ElementMap> bool intersects(x,y) -//============================================================================== -template<class Type, class CoType> -inline typename enable_if< mpl::and_< is_element_map<Type> - , is_total<Type> > - , bool>::type -intersects(const Type&, const CoType&) -{ - return true; -} - -template<class Type> -inline typename enable_if< mpl::and_< is_element_map<Type> - , mpl::not_<is_total<Type> > > - , bool>::type -intersects(const Type& object, const typename Type::domain_type& operand) -{ - return icl::contains(object, operand); -} - -template<class Type> -inline typename enable_if< mpl::and_< is_element_map<Type> - , mpl::not_<is_total<Type> > > - , bool>::type -intersects(const Type& object, const typename Type::set_type& operand) -{ - if(object.iterative_size() < operand.iterative_size()) - return Map::intersects(object, operand); - else - return Map::intersects(operand, object); -} - -template<class Type> -inline typename enable_if< mpl::and_< is_element_map<Type> - , mpl::not_<is_total<Type> > > - , bool>::type -intersects(const Type& object, const typename Type::element_type& operand) -{ - Type intersection; - icl::add_intersection(intersection, object, operand); - return !intersection.empty(); -} - -template<class Type> -inline typename enable_if< mpl::and_< is_element_map<Type> - , mpl::not_<is_total<Type> > > - , bool>::type -intersects(const Type& object, const Type& operand) -{ - if(object.iterative_size() < operand.iterative_size()) - return Map::intersects(object, operand); - else - return Map::intersects(operand, object); -} - -//============================================================================== -//= Symmetric difference -//============================================================================== -template<class Type> -inline typename enable_if<is_element_map<Type>, Type>::type& -flip(Type& object, const typename Type::element_type& operand) -{ - return object.flip(operand); -} - -template<class Type, class CoType> -inline typename enable_if< mpl::and_< is_element_map<Type> - , is_total<Type> - , absorbs_identities<Type> > - , Type>::type& -operator ^= (Type& object, const CoType&) -{ - icl::clear(object); - return object; -} - -template<class Type> -inline typename enable_if< mpl::and_< is_element_map<Type> - , is_total<Type> - , mpl::not_<absorbs_identities<Type> > > - , Type>::type& -operator ^= (Type& object, const typename Type::element_type& operand) -{ - return object.flip(operand); -} - -template<class Type> -inline typename enable_if< mpl::and_< is_element_map<Type> - , is_total<Type> - , mpl::not_<absorbs_identities<Type> > > - , Type>::type& -operator ^= (Type& object, const Type& operand) -{ - ICL_const_FORALL(typename Type, it_, operand) - icl::flip(object, *it_); - - ICL_FORALL(typename Type, it2_, object) - (*it2_).second = identity_element<typename Type::codomain_type>::value(); - - return object; -} - - -template<class Type> -inline typename enable_if< mpl::and_< is_element_map<Type> - , mpl::not_<is_total<Type> > > - , Type>::type& -operator ^= (Type& object, const typename Type::element_type& operand) -{ - return icl::flip(object, operand); -} - -template<class Type> -inline typename enable_if< mpl::and_< is_element_map<Type> - , mpl::not_<is_total<Type> > > - , Type>::type& -operator ^= (Type& object, const Type& operand) -{ - typedef typename Type::const_iterator const_iterator; - const_iterator it_ = operand.begin(); - while(it_ != operand.end()) - icl::flip(object, *it_++); - - return object; -} - - -//============================================================================== -//= Set selection -//============================================================================== -template<class Type> -inline typename enable_if<is_element_map<Type>, - typename Type::set_type>::type& -domain(typename Type::set_type& domain_set, const Type& object) -{ - typename Type::set_type::iterator prior_ = domain_set.end(); - typename Type::const_iterator it_ = object.begin(); - while(it_ != object.end()) - prior_ = domain_set.insert(prior_, (*it_++).first); - - return domain_set; -} - -//============================================================================== -//= Neutron absorbtion -//============================================================================== -template<class Type> -inline typename enable_if<mpl::and_< is_element_map<Type> - , absorbs_identities<Type> >, Type>::type& -absorb_identities(Type& object) -{ - typedef typename Type::element_type element_type; - return icl::erase_if(content_is_identity_element<element_type>(), object); -} - -template<class Type> -inline typename enable_if<mpl::and_< is_element_map<Type> - , mpl::not_<absorbs_identities<Type> > > - , Type>::type& -absorb_identities(Type&){} - -//============================================================================== -//= Streaming<ElementMap> -//============================================================================== -template<class CharType, class CharTraits, class Type> -inline typename enable_if<is_element_map<Type>, std::basic_ostream<CharType, CharTraits> >::type& -operator << (std::basic_ostream<CharType, CharTraits>& stream, const Type& object) -{ - stream << "{"; - ICL_const_FORALL(typename Type, it, object) - stream << "(" << it->first << "->" << it->second << ")"; - - return stream << "}"; -} - - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/concept/element_set.hpp b/contrib/restricted/boost/boost/icl/concept/element_set.hpp deleted file mode 100644 index 8db130e3b5f..00000000000 --- a/contrib/restricted/boost/boost/icl/concept/element_set.hpp +++ /dev/null @@ -1,134 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_ELEMENT_SET_HPP_JOFA_100921 -#define BOOST_ICL_CONCEPT_ELEMENT_SET_HPP_JOFA_100921 - -#include <boost/icl/type_traits/is_combinable.hpp> -#include <boost/icl/concept/set_value.hpp> -#include <boost/icl/detail/std_set.hpp> -#include <boost/icl/detail/set_algo.hpp> - - -namespace boost{ namespace icl -{ - -//============================================================================== -//= Addition<ElementSet> -//============================================================================== -/** \c add inserts \c operand into the map if it's key does - not exist in the map. - If \c operands's key value exists in the map, it's data - value is added to the data value already found in the map. */ -template <class Type> -typename enable_if<is_element_set<Type>, Type>::type& -add(Type& object, const typename Type::value_type& operand) -{ - object.insert(operand); - return object; -} - -/** \c add add \c operand into the map using \c prior as a hint to - insert \c operand after the position \c prior is pointing to. */ -template <class Type> -typename enable_if<is_element_set<Type>, typename Type::iterator>::type -add(Type& object, typename Type::iterator prior, - const typename Type::value_type& operand) -{ - return object.insert(prior, operand); -} - -//============================================================================== -//= Subtraction -//============================================================================== -/** If the \c operand's key value is in the map, it's data value is - subtraced from the data value stored in the map. */ -template<class Type> -typename enable_if<is_element_set<Type>, Type>::type& -subtract(Type& object, const typename Type::value_type& operand) -{ - object.erase(operand); - return object; -} - - -//============================================================================== -//= Intersection -//============================================================================== -template<class Type> -inline typename enable_if<is_element_set<Type>, bool>::type -intersects(const Type& object, const typename Type::key_type& operand) -{ - return !(object.find(operand) == object.end()); -} - -template<class Type> -inline typename enable_if<is_element_set<Type>, bool>::type -intersects(const Type& object, const Type& operand) -{ - if(iterative_size(object) < iterative_size(operand)) - return Set::intersects(object, operand); - else - return Set::intersects(operand, object); -} - -//============================================================================== -//= Symmetric difference -//============================================================================== -template<class Type> -inline typename enable_if<is_element_set<Type>, Type>::type& -flip(Type& object, const typename Type::value_type& operand) -{ - typedef typename Type::iterator iterator; - std::pair<iterator,bool> insertion = object.insert(operand); - if(!insertion.second) - object.erase(insertion.first); - - return object; -} - -template<class Type> -inline typename enable_if<is_element_set<Type>, Type>::type& -operator ^= (Type& object, const typename Type::element_type& operand) -{ - return icl::flip(object, operand); -} - -/** Symmetric subtract map \c x2 and \c *this. - So \c *this becomes the symmetric difference of \c *this and \c x2 */ -template<class Type> -inline typename enable_if<is_element_set<Type>, Type>::type& -operator ^= (Type& object, const Type& operand) -{ - typedef typename Type::const_iterator const_iterator; - const_iterator it_ = operand.begin(); - while(it_ != operand.end()) - icl::flip(object, *it_++); - - return object; -} - -//============================================================================== -//= Streaming<ElementSet> -//============================================================================== -template<class CharType, class CharTraits, class Type> -inline typename enable_if<is_element_set<Type>, std::basic_ostream<CharType, CharTraits> >::type& -operator << (std::basic_ostream<CharType, CharTraits>& stream, const Type& object) -{ - stream << "{"; - ICL_const_FORALL(typename Type, it, object) - stream << (*it) << " "; - - return stream << "}"; -} - - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/concept/element_set_value.hpp b/contrib/restricted/boost/boost/icl/concept/element_set_value.hpp deleted file mode 100644 index 274fc549db5..00000000000 --- a/contrib/restricted/boost/boost/icl/concept/element_set_value.hpp +++ /dev/null @@ -1,31 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_ELEMENT_SET_VALUE_HPP_JOFA_100924 -#define BOOST_ICL_CONCEPT_ELEMENT_SET_VALUE_HPP_JOFA_100924 - -#include <boost/icl/type_traits/is_element_container.hpp> - -namespace boost{ namespace icl -{ - -//============================================================================== -//= AlgoUnifiers<Set> -//============================================================================== -template<class Type, class Iterator> -inline typename enable_if<is_element_set<Type>, const typename Type::key_type>::type& -co_value(Iterator it_) -{ - return *it_; -} - - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/detail/interval_morphism.hpp b/contrib/restricted/boost/boost/icl/detail/interval_morphism.hpp deleted file mode 100644 index 4c85d545f07..00000000000 --- a/contrib/restricted/boost/boost/icl/detail/interval_morphism.hpp +++ /dev/null @@ -1,107 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315 -#define BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315 - -#include <boost/icl/detail/notate.hpp> -#include <boost/icl/concept/interval_set_value.hpp> -#include <boost/icl/concept/element_set_value.hpp> -#include <boost/icl/concept/set_value.hpp> -#include <boost/icl/concept/map_value.hpp> -#include <boost/icl/associative_interval_container.hpp> -#include <boost/icl/associative_element_container.hpp> - -namespace boost{namespace icl -{ - namespace segmental - { - template <typename ElementContainerT, typename IntervalContainerT> - void atomize(ElementContainerT& result, const IntervalContainerT& src) - { - ICL_const_FORALL(typename IntervalContainerT, itv_, src) - { - const typename IntervalContainerT::key_type& itv = icl::key_value<IntervalContainerT>(itv_); - typename IntervalContainerT::codomain_type coval = icl::co_value<IntervalContainerT>(itv_); - - for(typename IntervalContainerT::domain_type element = first(itv); element <= last(itv); ++element) - icl::insert(result, icl::make_value<ElementContainerT>(element, coval)); - } - } - - template <typename IntervalContainerT, typename ElementContainerT> - void cluster(IntervalContainerT& result, const ElementContainerT& src) - { - 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 codomain_type_of<ElementContainerT>::type& coval - = co_value<ElementContainerT>(element_); - - result += icl::make_value<IntervalContainerT>(key_type(key), coval); - } - } - - template <typename AtomizedType, typename ClusteredType> - struct atomizer - { - void operator()(AtomizedType& atomized, const ClusteredType& clustered) - { - segmental::atomize(atomized, clustered); - } - }; - - template <typename ClusteredType, typename AtomizedType> - struct clusterer - { - void operator()(ClusteredType& clustered, const AtomizedType& atomized) - { - segmental::cluster(clustered, atomized); - } - }; - - template <typename JointType, typename SplitType> - struct joiner - { - void operator()(JointType& joint, SplitType& split) - { - icl::join(split); - ICL_FORALL(typename SplitType, split_, split) - joint.insert(*split_); - } - }; - - template <typename AbsorberType, typename EnricherType> - struct identity_absorber - { - void operator()(AbsorberType& absorber, EnricherType& enricher) - { - icl::absorb_identities(enricher); - ICL_FORALL(typename EnricherType, enricher_, enricher) - absorber.insert(*enricher_); - } - }; - - } // namespace Interval - - - template<> - inline std::string binary_template_to_string<segmental::atomizer>::apply() { return "@"; } - template<> - inline std::string binary_template_to_string<segmental::clusterer>::apply() { return "&"; } - template<> - inline std::string binary_template_to_string<segmental::joiner>::apply() { return "j"; } - template<> - inline std::string binary_template_to_string<segmental::identity_absorber>::apply() { return "a0"; } -}} // namespace boost icl - -#endif // BOOST_ICL_DETAIL_INTERVAL_MORPHISM_HPP_JOFA_080315 - - - diff --git a/contrib/restricted/boost/boost/icl/detail/on_absorbtion.hpp b/contrib/restricted/boost/boost/icl/detail/on_absorbtion.hpp deleted file mode 100644 index e230072bf5e..00000000000 --- a/contrib/restricted/boost/boost/icl/detail/on_absorbtion.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_TYPE_TRAITS_ON_ABSORBTION_HPP_JOFA_100915 -#define BOOST_ICL_TYPE_TRAITS_ON_ABSORBTION_HPP_JOFA_100915 - -namespace boost{ namespace icl -{ - -template<class Type, class Combiner, bool absorbs_identities> -struct on_absorbtion; - -template<class Type, class Combiner> -struct on_absorbtion<Type, Combiner, false> -{ - typedef on_absorbtion type; - typedef typename Type::codomain_type codomain_type; - - static bool is_absorbable(const codomain_type&){ return false; } -}; - -template<class Type, class Combiner> -struct on_absorbtion<Type, Combiner, true> -{ - typedef on_absorbtion type; - typedef typename Type::codomain_type codomain_type; - typedef typename Type::codomain_combine codomain_combine; - - static bool is_absorbable(const codomain_type& co_value) - { - return co_value == Combiner::identity_element(); - } -}; - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/detail/std_set.hpp b/contrib/restricted/boost/boost/icl/detail/std_set.hpp deleted file mode 100644 index dc193cdebb9..00000000000 --- a/contrib/restricted/boost/boost/icl/detail/std_set.hpp +++ /dev/null @@ -1,45 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-2010: 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_DETAIL_STD_SET_HPP_JOFA_101007 -#define BOOST_ICL_DETAIL_STD_SET_HPP_JOFA_101007 - -#include <set> -#include <boost/config.hpp> -#include <boost/icl/type_traits/type_to_string.hpp> -#include <boost/icl/type_traits/is_set.hpp> - - -namespace boost{namespace icl -{ - -template <class Type> -struct is_set<std::set<Type> > -{ - typedef is_set<std::set<Type> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - - -template <class Type> -struct type_to_string<std::set<Type> > -{ - static std::string apply() - { return "set<"+ type_to_string<Type>::apply() +">"; } -}; - -template <class Type> -struct type_to_string<std::set<Type, std::greater<Type> > > -{ - static std::string apply() - { return "set<"+ type_to_string<Type>::apply() +" g>"; } -}; - -}} // namespace icl boost - -#endif // BOOST_ICL_DETAIL_STD_SET_HPP_JOFA_101007 - diff --git a/contrib/restricted/boost/boost/icl/detail/subset_comparer.hpp b/contrib/restricted/boost/boost/icl/detail/subset_comparer.hpp deleted file mode 100644 index 29f25a2240f..00000000000 --- a/contrib/restricted/boost/boost/icl/detail/subset_comparer.hpp +++ /dev/null @@ -1,259 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_SUBSET_COMPARER_HPP_JOFA_090202 -#define BOOST_ICL_SUBSET_COMPARER_HPP_JOFA_090202 - -#include <boost/mpl/and.hpp> -#include <boost/icl/type_traits/is_map.hpp> -#include <boost/icl/detail/notate.hpp> -#include <boost/icl/detail/relation_state.hpp> -#include <boost/icl/type_traits/identity_element.hpp> -#include <boost/icl/type_traits/codomain_type_of.hpp> -#include <boost/icl/type_traits/is_concept_equivalent.hpp> -#include <boost/icl/type_traits/is_element_container.hpp> -#include <boost/icl/concept/interval_set_value.hpp> -#include <boost/icl/concept/map_value.hpp> - -namespace boost{namespace icl -{ - -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4127) // conditional expression is constant -#endif - -namespace Set -{ - -//------------------------------------------------------------------------------ -template<class LeftT, class RightT> -struct settic_codomain_compare -{ - static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) - { - return inclusion_compare( co_value<LeftT>(left_), - co_value<RightT>(right_)); - } -}; - -template<class LeftT, class RightT> -struct atomic_codomain_compare -{ - static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) - { - if(co_value<LeftT>(left_) == co_value<RightT>(right_)) - return inclusion::equal; - else - return inclusion::unrelated; - } -}; - -template<class LeftT, class RightT> -struct empty_codomain_compare -{ - static int apply(typename LeftT::const_iterator&, typename RightT::const_iterator&) - { - return inclusion::equal; - } -}; - -template<class LeftT, class RightT> -struct map_codomain_compare -{ - static int apply(typename LeftT::const_iterator& left_, typename RightT::const_iterator& right_) - { - using namespace boost::mpl; - typedef typename LeftT::codomain_type LeftCodomainT; - typedef typename RightT::codomain_type RightCodomainT; - - return - if_< - bool_<is_concept_equivalent<is_set,LeftCodomainT, - RightCodomainT>::value>, - settic_codomain_compare<LeftT,RightT>, - atomic_codomain_compare<LeftT,RightT> - > - ::type::apply(left_, right_); - } -}; - - -//------------------------------------------------------------------------------ -template<class LeftT, class RightT> -class subset_comparer -{ -private: - subset_comparer& operator = (const subset_comparer&); -public: - typedef typename LeftT::const_iterator LeftIterT; - typedef typename RightT::const_iterator RightIterT; - - BOOST_STATIC_CONSTANT(bool, - _compare_codomain = (mpl::and_<is_map<LeftT>, is_map<RightT> >::value)); - - subset_comparer(const LeftT& left, - const RightT& right, - const LeftIterT& left_end, - const RightIterT& right_end) - : _left(left), _right(right), - _left_end(left_end), _right_end(right_end), _result(equal) - {} - - enum{nextboth, stop}; - - enum - { - unrelated = inclusion::unrelated, - subset = inclusion::subset, // left is_subset_of right - superset = inclusion::superset, // left is_superset_of right - equal = inclusion::equal // equal = subset | superset - }; - - int result()const{ return _result; } - - int co_compare(LeftIterT& left, RightIterT& right) - { - using namespace boost::mpl; - //CL typedef typename codomain_type_of<LeftT>::type LeftCodomainT; - //CL typedef typename codomain_type_of<RightT>::type RightCodomainT; - - return - if_< - bool_<is_concept_equivalent<is_element_map,LeftT,RightT>::value>, - map_codomain_compare<LeftT,RightT>, - empty_codomain_compare<LeftT,RightT> - > - ::type::apply(left,right); - } - - int restrict_result(int state) { return _result &= state; } - - int next_both(LeftIterT& left, RightIterT& right) - { - if(left == _left_end && right == _right_end) - return stop; - else if(left == _left_end) - { - restrict_result(subset); - return stop; - } - else if(right == _right_end) - { - restrict_result(superset); - return stop; - } - else if(typename LeftT::key_compare()(key_value<LeftT>(left), key_value<RightT>(right))) - { // left: *left . . *joint_ left could be superset - // right: *right ... if joint_ exists - restrict_result(superset); - if(unrelated == _result) - return stop; - else - { - LeftIterT joint_ = _left.lower_bound(key_value<RightT>(right)); - if( joint_ == _left.end() - || typename LeftT::key_compare()(key_value<RightT>(right), key_value<LeftT>(joint_))) - { - _result = unrelated; - return stop; - } - else - left = joint_; - } - } - else if(typename LeftT::key_compare()(key_value<RightT>(right), key_value<LeftT>(left))) - { // left: *left left could be subset - // right:*right . . .*joint_ if *joint_ exists - restrict_result(subset); - if(unrelated == _result) - return stop; - else - { - RightIterT joint_ = _right.lower_bound(key_value<LeftT>(left)); - if( joint_ == _right.end() - || typename LeftT::key_compare()(key_value<LeftT>(left), key_value<RightT>(joint_))) - { - _result = unrelated; - return stop; - } - else - right = joint_; - } - } - - // left =key= right - if(_compare_codomain) - if(unrelated == restrict_result(co_compare(left,right))) - return stop; - - ++left; - ++right; - return nextboth; - } - -private: - const LeftT& _left; - const RightT& _right; - LeftIterT _left_end; - RightIterT _right_end; - int _result; -}; - - - - - -//------------------------------------------------------------------------------ -// Subset/superset comparison on ranges of two interval container -//------------------------------------------------------------------------------ -template<class LeftT, class RightT> -int subset_compare -( - const LeftT& left, //sub - const RightT& right, //super - typename LeftT::const_iterator left_begin, - typename LeftT::const_iterator left_end, - typename RightT::const_iterator right_begin, - typename RightT::const_iterator right_end -) -{ - typedef subset_comparer<LeftT,RightT> Step; - Step step(left, right, left_end, right_end); - - typename LeftT::const_iterator left_ = left_begin; - typename RightT::const_iterator right_ = right_begin; - - int state = Step::nextboth; - while(state != Step::stop) - state = step.next_both(left_, right_); - - return step.result(); -} - -template<class LeftT, class RightT> -int subset_compare(const LeftT& left, const RightT& right) -{ - return subset_compare - ( - left, right, - left.begin(), left.end(), - right.begin(), right.end() - ); -} - - -} // namespace Set - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -}} // namespace icl boost - -#endif - diff --git a/contrib/restricted/boost/boost/icl/functors.hpp b/contrib/restricted/boost/boost/icl/functors.hpp deleted file mode 100644 index b4971f479b2..00000000000 --- a/contrib/restricted/boost/boost/icl/functors.hpp +++ /dev/null @@ -1,473 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_FUNCTORS_HPP_JOFA_080315 -#define BOOST_ICL_FUNCTORS_HPP_JOFA_080315 - -#include <boost/type_traits.hpp> -#include <boost/mpl/if.hpp> -#include <boost/icl/type_traits/identity_element.hpp> -#include <boost/icl/type_traits/unit_element.hpp> -#include <boost/icl/type_traits/is_set.hpp> -#include <boost/icl/type_traits/has_set_semantics.hpp> - -namespace boost{namespace icl -{ - // ------------------------------------------------------------------------ - template <typename Type> struct identity_based_inplace_combine - { - typedef Type& first_argument_type; - typedef const Type& second_argument_type; - typedef void result_type; - inline static Type identity_element() { return boost::icl::identity_element<Type>::value(); } - }; - - // ------------------------------------------------------------------------ - template <typename Type> struct unit_element_based_inplace_combine - { - typedef Type& first_argument_type; - typedef const Type& second_argument_type; - typedef void result_type; - inline static Type identity_element() { return boost::icl::unit_element<Type>::value(); } - }; - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_identity - : public identity_based_inplace_combine<Type> - { - typedef inplace_identity<Type> type; - void operator()(Type&, const Type&)const{} - }; - - template<> - inline std::string unary_template_to_string<inplace_identity>::apply() - { return "i="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_erasure - : public identity_based_inplace_combine<Type> - { - typedef inplace_erasure<Type> type; - typedef identity_based_inplace_combine<Type> base_type; - - void operator()(Type& object, const Type& operand)const - { - if(object == operand) - //identity_element(); //JODO Old gcc-3.4.4 does not compile this - object = base_type::identity_element(); //<-- but this. - } - }; - - template<> - inline std::string unary_template_to_string<inplace_erasure>::apply() - { return "0="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_plus - : public identity_based_inplace_combine<Type> - { - typedef inplace_plus<Type> type; - - void operator()(Type& object, const Type& operand)const - { object += operand; } - - static void version(Type&){} - }; - - template<> - inline std::string unary_template_to_string<inplace_plus>::apply() { return "+="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_minus - : public identity_based_inplace_combine<Type> - { - typedef inplace_minus<Type> type; - - void operator()(Type& object, const Type& operand)const - { object -= operand; } - }; - - template<> - inline std::string unary_template_to_string<inplace_minus>::apply() { return "-="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_bit_add - : public identity_based_inplace_combine<Type> - { - typedef inplace_bit_add<Type> type; - - void operator()(Type& object, const Type& operand)const - { object |= operand; } - - static void version(Type&){} - }; - - template<> - inline std::string unary_template_to_string<inplace_bit_add>::apply() { return "b|="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_bit_subtract - : public identity_based_inplace_combine<Type> - { - typedef inplace_bit_subtract<Type> type; - - void operator()(Type& object, const Type& operand)const - { object &= ~operand; } - }; - - template<> - inline std::string unary_template_to_string<inplace_bit_subtract>::apply() { return "b-="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_bit_and - : public identity_based_inplace_combine<Type> - { - typedef inplace_bit_and<Type> type; - - void operator()(Type& object, const Type& operand)const - { object &= operand; } - }; - - template<> - inline std::string unary_template_to_string<inplace_bit_and>::apply() { return "b&="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_bit_xor - : public identity_based_inplace_combine<Type> - { - typedef inplace_bit_xor<Type> type; - - void operator()(Type& object, const Type& operand)const - { object ^= operand; } - }; - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_et - : public identity_based_inplace_combine<Type> - { - typedef inplace_et<Type> type; - - void operator()(Type& object, const Type& operand)const - { object &= operand; } - }; - - template<> - inline std::string unary_template_to_string<inplace_et>::apply() { return "&="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_caret - : public identity_based_inplace_combine<Type> - { - typedef inplace_caret<Type> type; - - void operator()(Type& object, const Type& operand)const - { object ^= operand; } - }; - - template<> - inline std::string unary_template_to_string<inplace_caret>::apply() { return "^="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_insert - : public identity_based_inplace_combine<Type> - { - typedef inplace_insert<Type> type; - - void operator()(Type& object, const Type& operand)const - { insert(object,operand); } - }; - - template<> - inline std::string unary_template_to_string<inplace_insert>::apply() { return "ins="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_erase - : public identity_based_inplace_combine<Type> - { - typedef inplace_erase<Type> type; - - void operator()(Type& object, const Type& operand)const - { erase(object,operand); } - }; - - template<> - inline std::string unary_template_to_string<inplace_erase>::apply() { return "ers="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_star - : public identity_based_inplace_combine<Type> //JODO unit_element_ - { - typedef inplace_star<Type> type; - - void operator()(Type& object, const Type& operand)const - { object *= operand; } - }; - - template<> - inline std::string unary_template_to_string<inplace_star>::apply() { return "*="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_slash - : public identity_based_inplace_combine<Type> //JODO unit_element_ - { - typedef inplace_slash<Type> type; - - void operator()(Type& object, const Type& operand)const - { object /= operand; } - }; - - template<> - inline std::string unary_template_to_string<inplace_slash>::apply() { return "/="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_max - : public identity_based_inplace_combine<Type> - { - typedef inplace_max<Type> type; - - void operator()(Type& object, const Type& operand)const - { - if(object < operand) - object = operand; - } - }; - - template<> - inline std::string unary_template_to_string<inplace_max>::apply() { return "max="; } - - // ------------------------------------------------------------------------ - template <typename Type> struct inplace_min - : public identity_based_inplace_combine<Type> - { - typedef inplace_min<Type> type; - - void operator()(Type& object, const Type& operand)const - { - if(object > operand) - object = operand; - } - }; - - template<> - inline std::string unary_template_to_string<inplace_min>::apply() { return "min="; } - - //-------------------------------------------------------------------------- - // Inter_section functor - //-------------------------------------------------------------------------- - template<class Type> struct inter_section - : public identity_based_inplace_combine<Type> - { - typedef typename boost::mpl:: - if_<has_set_semantics<Type>, - icl::inplace_et<Type>, - icl::inplace_plus<Type> - >::type - type; - - void operator()(Type& object, const Type& operand)const - { - type()(object, operand); - } - }; - - //-------------------------------------------------------------------------- - // Inverse functor - //-------------------------------------------------------------------------- - template<class Functor> struct inverse; - - template<class Type> - struct inverse<icl::inplace_plus<Type> > - { typedef icl::inplace_minus<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_minus<Type> > - { typedef icl::inplace_plus<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_bit_add<Type> > - { typedef icl::inplace_bit_subtract<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_bit_subtract<Type> > - { typedef icl::inplace_bit_add<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_et<Type> > - { typedef icl::inplace_caret<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_caret<Type> > - { typedef icl::inplace_et<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_bit_and<Type> > - { typedef icl::inplace_bit_xor<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_bit_xor<Type> > - { typedef icl::inplace_bit_and<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_star<Type> > - { typedef icl::inplace_slash<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_slash<Type> > - { typedef icl::inplace_star<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_max<Type> > - { typedef icl::inplace_min<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_min<Type> > - { typedef icl::inplace_max<Type> type; }; - - template<class Type> - struct inverse<icl::inplace_identity<Type> > - { typedef icl::inplace_erasure<Type> type; }; - - // If a Functor - template<class Functor> - struct inverse - { - typedef typename - remove_reference<typename Functor::first_argument_type>::type argument_type; - typedef icl::inplace_erasure<argument_type> type; - }; - - - //-------------------------------------------------------------------------- - // Inverse inter_section functor - //-------------------------------------------------------------------------- - template<class Type> - struct inverse<icl::inter_section<Type> > - : public identity_based_inplace_combine<Type> - { - typedef typename boost::mpl:: - if_<has_set_semantics<Type>, - icl::inplace_caret<Type>, - icl::inplace_minus<Type> - >::type - type; - - void operator()(Type& object, const Type& operand)const - { - type()(object, operand); - } - }; - - - //-------------------------------------------------------------------------- - // Positive or negative functor trait - //-------------------------------------------------------------------------- - - // A binary operation - is negative (or inverting) with respect to the - // neutral element iff it yields the inverse element if it is applied to the - // identity element: - // 0 - x = -x - // For a functor that wraps the inplace of op-assign version this is - // equivalent to - // - // T x = ..., y; - // y = Functor::identity_element(); - // Functor()(y, x); // y == inverse_of(x) - - template<class Functor> struct is_negative; - - template<class Functor> - struct is_negative - { - typedef is_negative<Functor> type; - BOOST_STATIC_CONSTANT(bool, value = false); - }; - - template<class Type> - struct is_negative<icl::inplace_minus<Type> > - { - typedef is_negative type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<class Type> - struct is_negative<icl::inplace_bit_subtract<Type> > - { - typedef is_negative type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - //-------------------------------------------------------------------------- - // Pro- or in-version functor - //-------------------------------------------------------------------------- - template<class Combiner> struct conversion; - - template<class Combiner> - struct conversion - { - typedef conversion<Combiner> type; - typedef typename - remove_const< - typename remove_reference<typename Combiner::first_argument_type - >::type - >::type - argument_type; - // The proversion of an op-assign functor o= lets the value unchanged - // (0 o= x) == x; - // Example += : (0 += x) == x - static argument_type proversion(const argument_type& value) - { - return value; - } - - // The inversion of an op-assign functor o= inverts the value x - // to it's inverse element -x - // (0 o= x) == -x; - // Example -= : (0 -= x) == -x - static argument_type inversion(const argument_type& value) - { - argument_type inverse = Combiner::identity_element(); - Combiner()(inverse, value); - return inverse; - } - }; - - template<class Combiner> struct version : public conversion<Combiner> - { - typedef version<Combiner> type; - typedef conversion<Combiner> base_type; - typedef typename base_type::argument_type argument_type; - - argument_type operator()(const argument_type& value) - { return base_type::proversion(value); } - }; - - template<>struct version<icl::inplace_minus<short > >{short operator()(short val){return -val;}}; - template<>struct version<icl::inplace_minus<int > >{int operator()(int val){return -val;}}; - template<>struct version<icl::inplace_minus<long > >{long operator()(long val){return -val;}}; - template<>struct version<icl::inplace_minus<long long > >{long long operator()(long long val){return -val;}}; - template<>struct version<icl::inplace_minus<float > >{float operator()(float val){return -val;}}; - template<>struct version<icl::inplace_minus<double > >{double operator()(double val){return -val;}}; - template<>struct version<icl::inplace_minus<long double> >{long double operator()(long double val){return -val;}}; - - template<class Type> - struct version<icl::inplace_minus<Type> > : public conversion<icl::inplace_minus<Type> > - { - typedef version<icl::inplace_minus<Type> > type; - typedef conversion<icl::inplace_minus<Type> > base_type; - typedef typename base_type::argument_type argument_type; - - Type operator()(const Type& value) - { - return base_type::inversion(value); - } - }; - -}} // namespace icl boost - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/gregorian.hpp b/contrib/restricted/boost/boost/icl/gregorian.hpp deleted file mode 100644 index a1016170931..00000000000 --- a/contrib/restricted/boost/boost/icl/gregorian.hpp +++ /dev/null @@ -1,127 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_GREGORIAN_DATE_HPP_JOFA_080416 -#define BOOST_ICL_GREGORIAN_DATE_HPP_JOFA_080416 - -#include <boost/icl/detail/boost_config.hpp> -#include <boost/detail/workaround.hpp> - -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4100) // unreferenced formal parameter -#pragma warning(disable:4127) // conditional expression is constant -#pragma warning(disable:4244) // 'argument' : conversion from 'int' to 'unsigned short', possible loss of data -#pragma warning(disable:4702) // boost\lexical_cast.hpp(1159) : warning C4702: unreachable code -#pragma warning(disable:4996) // Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' -#endif - -#include <stdio.h> -#include <string> -#include <sstream> -#include <iostream> -#include <boost/date_time/gregorian/gregorian.hpp> - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include <boost/icl/type_traits/identity_element.hpp> -#include <boost/icl/type_traits/is_discrete.hpp> -#include <boost/icl/type_traits/difference_type_of.hpp> -#include <boost/icl/type_traits/size_type_of.hpp> - -namespace boost{namespace icl -{ - template<> struct is_discrete<boost::gregorian::date> - { - typedef is_discrete type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<> - inline boost::gregorian::date identity_element<boost::gregorian::date>::value() - { - return boost::gregorian::date(boost::gregorian::min_date_time); - } - - template<> - struct identity_element<boost::gregorian::date_duration> - { - static boost::gregorian::date_duration value() - { - return boost::gregorian::date(boost::gregorian::min_date_time) - - boost::gregorian::date(boost::gregorian::min_date_time); - } - }; - - template<> - struct has_difference<boost::gregorian::date> - { - typedef has_difference type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<> - struct difference_type_of<boost::gregorian::date> - { typedef boost::gregorian::date_duration type; }; - - template<> - struct size_type_of<boost::gregorian::date> - { typedef boost::gregorian::date_duration type; }; - - - - // ------------------------------------------------------------------------ - inline boost::gregorian::date operator ++(boost::gregorian::date& x) - { - return x += boost::gregorian::date::duration_type::unit(); - } - - inline boost::gregorian::date operator --(boost::gregorian::date& x) - { - return x -= boost::gregorian::date::duration_type::unit(); - } - - // ------------------------------------------------------------------------ - template<> struct is_discrete<boost::gregorian::date_duration> - { - typedef is_discrete type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<> - struct has_difference<boost::gregorian::date_duration> - { - typedef has_difference type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<> - struct size_type_of<boost::gregorian::date_duration> - { - typedef boost::gregorian::date_duration type; - }; - - inline boost::gregorian::date_duration operator ++(boost::gregorian::date_duration& x) - { - return x += boost::gregorian::date::duration_type::unit(); - } - - inline boost::gregorian::date_duration operator --(boost::gregorian::date_duration& x) - { - return x -= boost::gregorian::date::duration_type::unit(); - } - - // ------------------------------------------------------------------------ - - -}} // namespace icl boost - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/interval_base_map.hpp b/contrib/restricted/boost/boost/icl/interval_base_map.hpp deleted file mode 100644 index f61990b2d01..00000000000 --- a/contrib/restricted/boost/boost/icl/interval_base_map.hpp +++ /dev/null @@ -1,1389 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-2012: Joachim Faulhaber -Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin -+------------------------------------------------------------------------------+ - 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_INTERVAL_BASE_MAP_HPP_JOFA_990223 -#define BOOST_ICL_INTERVAL_BASE_MAP_HPP_JOFA_990223 - -#include <limits> -#include <boost/mpl/and.hpp> -#include <boost/mpl/or.hpp> -#include <boost/mpl/not.hpp> - -#include <boost/icl/detail/notate.hpp> -#include <boost/icl/detail/design_config.hpp> -#include <boost/icl/detail/on_absorbtion.hpp> -#include <boost/icl/detail/interval_map_algo.hpp> - -#include <boost/icl/associative_interval_container.hpp> - -#include <boost/icl/type_traits/is_interval_splitter.hpp> -#include <boost/icl/map.hpp> - -namespace boost{namespace icl -{ - -template<class DomainT, class CodomainT> -struct mapping_pair -{ - DomainT key; - CodomainT data; - - mapping_pair():key(), data(){} - - mapping_pair(const DomainT& key_value, const CodomainT& data_value) - :key(key_value), data(data_value){} - - mapping_pair(const std::pair<DomainT,CodomainT>& std_pair) - :key(std_pair.first), data(std_pair.second){} -}; - -/** \brief Implements a map as a map of intervals (base class) */ -template -< - class SubType, - typename DomainT, - typename CodomainT, - class Traits = icl::partial_absorber, - ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT), - ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT), - ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT), - ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), - ICL_ALLOC Alloc = std::allocator -> -class interval_base_map -{ -public: - //========================================================================== - //= Associated types - //========================================================================== - typedef interval_base_map<SubType,DomainT,CodomainT, - Traits,Compare,Combine,Section,Interval,Alloc> - type; - - /// The designated \e derived or \e sub_type of this base class - typedef SubType sub_type; - - /// Auxilliary type for overloadresolution - typedef type overloadable_type; - - /// Traits of an itl map - typedef Traits traits; - - //-------------------------------------------------------------------------- - //- Associated types: Related types - //-------------------------------------------------------------------------- - /// The atomized type representing the corresponding container of elements - typedef typename icl::map<DomainT,CodomainT, - Traits,Compare,Combine,Section,Alloc> atomized_type; - - //-------------------------------------------------------------------------- - //- Associated types: Data - //-------------------------------------------------------------------------- - /// Domain type (type of the keys) of the map - typedef DomainT domain_type; - typedef typename boost::call_traits<DomainT>::param_type domain_param; - /// Domain type (type of the keys) of the map - typedef CodomainT codomain_type; - /// Auxiliary type to help the compiler resolve ambiguities when using std::make_pair - typedef mapping_pair<domain_type,codomain_type> domain_mapping_type; - /// Conceptual is a map a set of elements of type \c element_type - typedef domain_mapping_type element_type; - /// The interval type of the map - typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; - /// Auxiliary type for overload resolution - typedef std::pair<interval_type,CodomainT> interval_mapping_type; - /// Type of an interval containers segment, that is spanned by an interval - typedef std::pair<interval_type,CodomainT> segment_type; - - //-------------------------------------------------------------------------- - //- Associated types: Size - //-------------------------------------------------------------------------- - /// The difference type of an interval which is sometimes different form the domain_type - typedef typename difference_type_of<domain_type>::type difference_type; - /// The size type of an interval which is mostly std::size_t - typedef typename size_type_of<domain_type>::type size_type; - - //-------------------------------------------------------------------------- - //- Associated types: Functors - //-------------------------------------------------------------------------- - /// Comparison functor for domain values - typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; - typedef ICL_COMPARE_DOMAIN(Compare,segment_type) segment_compare; - /// Combine functor for codomain value aggregation - typedef ICL_COMBINE_CODOMAIN(Combine,CodomainT) codomain_combine; - /// Inverse Combine functor for codomain value aggregation - typedef typename inverse<codomain_combine>::type inverse_codomain_combine; - /// Intersection functor for codomain values - - typedef typename mpl::if_ - <has_set_semantics<codomain_type> - , ICL_SECTION_CODOMAIN(Section,CodomainT) - , codomain_combine - >::type codomain_intersect; - - - /// Inverse Combine functor for codomain value intersection - typedef typename inverse<codomain_intersect>::type inverse_codomain_intersect; - - /// Comparison functor for intervals which are keys as well - typedef exclusive_less_than<interval_type> interval_compare; - - /// Comparison functor for keys - typedef exclusive_less_than<interval_type> key_compare; - - //-------------------------------------------------------------------------- - //- Associated types: Implementation and stl related - //-------------------------------------------------------------------------- - /// The allocator type of the set - typedef Alloc<std::pair<const interval_type, codomain_type> > - allocator_type; - - /// Container type for the implementation - typedef ICL_IMPL_SPACE::map<interval_type,codomain_type, - key_compare,allocator_type> ImplMapT; - - /// key type of the implementing container - typedef typename ImplMapT::key_type key_type; - /// value type of the implementing container - typedef typename ImplMapT::value_type value_type; - /// data type of the implementing container - typedef typename ImplMapT::value_type::second_type data_type; - - /// pointer type - typedef typename ImplMapT::pointer pointer; - /// const pointer type - typedef typename ImplMapT::const_pointer const_pointer; - /// reference type - typedef typename ImplMapT::reference reference; - /// const reference type - typedef typename ImplMapT::const_reference const_reference; - - /// iterator for iteration over intervals - typedef typename ImplMapT::iterator iterator; - /// const_iterator for iteration over intervals - typedef typename ImplMapT::const_iterator const_iterator; - /// iterator for reverse iteration over intervals - typedef typename ImplMapT::reverse_iterator reverse_iterator; - /// const_iterator for iteration over intervals - typedef typename ImplMapT::const_reverse_iterator const_reverse_iterator; - - /// element iterator: Depreciated, see documentation. - typedef boost::icl::element_iterator<iterator> element_iterator; - /// const element iterator: Depreciated, see documentation. - typedef boost::icl::element_iterator<const_iterator> element_const_iterator; - /// element reverse iterator: Depreciated, see documentation. - typedef boost::icl::element_iterator<reverse_iterator> element_reverse_iterator; - /// element const reverse iterator: Depreciated, see documentation. - typedef boost::icl::element_iterator<const_reverse_iterator> element_const_reverse_iterator; - - typedef typename on_absorbtion<type, codomain_combine, - Traits::absorbs_identities>::type on_codomain_absorbtion; - -public: - BOOST_STATIC_CONSTANT(bool, - is_total_invertible = ( Traits::is_total - && has_inverse<codomain_type>::value)); - - BOOST_STATIC_CONSTANT(int, fineness = 0); - -public: - - //========================================================================== - //= Construct, copy, destruct - //========================================================================== - /** Default constructor for the empty object */ - interval_base_map() - { - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>)); - BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>)); - } - - /** Copy constructor */ - interval_base_map(const interval_base_map& src): _map(src._map) - { - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>)); - BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>)); - } - -# ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - //========================================================================== - //= Move semantics - //========================================================================== - - /** Move constructor */ - interval_base_map(interval_base_map&& src): _map(boost::move(src._map)) - { - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>)); - BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>)); - } - - /** Move assignment operator */ - interval_base_map& operator = (interval_base_map src) - { //call by value sice 'src' is a "sink value" - this->_map = boost::move(src._map); - return *this; - } - - //========================================================================== -# else - - /** Copy assignment operator */ - interval_base_map& operator = (const interval_base_map& src) - { - this->_map = src._map; - return *this; - } - -# endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - - /** swap the content of containers */ - void swap(interval_base_map& object) { _map.swap(object._map); } - - //========================================================================== - //= Containedness - //========================================================================== - /** clear the map */ - void clear() { icl::clear(*that()); } - - /** is the map empty? */ - bool empty()const { return icl::is_empty(*that()); } - - //========================================================================== - //= Size - //========================================================================== - /** An interval map's size is it's cardinality */ - size_type size()const - { - return icl::cardinality(*that()); - } - - /** Size of the iteration over this container */ - std::size_t iterative_size()const - { - return _map.size(); - } - - //========================================================================== - //= Selection - //========================================================================== - - /** Find the interval value pair, that contains \c key */ - const_iterator find(const domain_type& key_value)const - { - return icl::find(*this, key_value); - } - - /** Find the first interval value pair, that collides with interval - \c key_interval */ - const_iterator find(const interval_type& key_interval)const - { - return _map.find(key_interval); - } - - /** Total select function. */ - codomain_type operator()(const domain_type& key_value)const - { - const_iterator it_ = icl::find(*this, key_value); - return it_==end() ? identity_element<codomain_type>::value() - : (*it_).second; - } - - //========================================================================== - //= Addition - //========================================================================== - - /** Addition of a key value pair to the map */ - SubType& add(const element_type& key_value_pair) - { - return icl::add(*that(), key_value_pair); - } - - /** Addition of an interval value pair to the map. */ - SubType& add(const segment_type& interval_value_pair) - { - this->template _add<codomain_combine>(interval_value_pair); - return *that(); - } - - /** Addition of an interval value pair \c interval_value_pair to the map. - Iterator \c prior_ is a hint to the position \c interval_value_pair can be - inserted after. */ - iterator add(iterator prior_, const segment_type& interval_value_pair) - { - return this->template _add<codomain_combine>(prior_, interval_value_pair); - } - - //========================================================================== - //= Subtraction - //========================================================================== - /** Subtraction of a key value pair from the map */ - SubType& subtract(const element_type& key_value_pair) - { - return icl::subtract(*that(), key_value_pair); - } - - /** Subtraction of an interval value pair from the map. */ - SubType& subtract(const segment_type& interval_value_pair) - { - on_invertible<type, is_total_invertible> - ::subtract(*that(), interval_value_pair); - return *that(); - } - - //========================================================================== - //= Insertion - //========================================================================== - /** Insertion of a \c key_value_pair into the map. */ - SubType& insert(const element_type& key_value_pair) - { - return icl::insert(*that(), key_value_pair); - } - - /** Insertion of an \c interval_value_pair into the map. */ - SubType& insert(const segment_type& interval_value_pair) - { - _insert(interval_value_pair); - return *that(); - } - - /** Insertion of an \c interval_value_pair into the map. Iterator \c prior_. - serves as a hint to insert after the element \c prior point to. */ - iterator insert(iterator prior, const segment_type& interval_value_pair) - { - return _insert(prior, interval_value_pair); - } - - /** With <tt>key_value_pair = (k,v)</tt> set value \c v for key \c k */ - SubType& set(const element_type& key_value_pair) - { - return icl::set_at(*that(), key_value_pair); - } - - /** With <tt>interval_value_pair = (I,v)</tt> set value \c v - for all keys in interval \c I in the map. */ - SubType& set(const segment_type& interval_value_pair) - { - return icl::set_at(*that(), interval_value_pair); - } - - //========================================================================== - //= Erasure - //========================================================================== - /** Erase a \c key_value_pair from the map. */ - SubType& erase(const element_type& key_value_pair) - { - icl::erase(*that(), key_value_pair); - return *that(); - } - - /** Erase an \c interval_value_pair from the map. */ - SubType& erase(const segment_type& interval_value_pair); - - /** Erase a key value pair for \c key. */ - SubType& erase(const domain_type& key) - { - return icl::erase(*that(), key); - } - - /** Erase all value pairs within the range of the - interval <tt>inter_val</tt> from the map. */ - SubType& erase(const interval_type& inter_val); - - - /** Erase all value pairs within the range of the interval that iterator - \c position points to. */ - void erase(iterator position){ this->_map.erase(position); } - - /** Erase all value pairs for a range of iterators <tt>[first,past)</tt>. */ - void erase(iterator first, iterator past){ this->_map.erase(first, past); } - - //========================================================================== - //= Intersection - //========================================================================== - /** The intersection of \c interval_value_pair and \c *this map is added to \c section. */ - void add_intersection(SubType& section, const segment_type& interval_value_pair)const - { - on_definedness<SubType, Traits::is_total> - ::add_intersection(section, *that(), interval_value_pair); - } - - //========================================================================== - //= Symmetric difference - //========================================================================== - /** If \c *this map contains \c key_value_pair it is erased, otherwise it is added. */ - SubType& flip(const element_type& key_value_pair) - { - return icl::flip(*that(), key_value_pair); - } - - /** If \c *this map contains \c interval_value_pair it is erased, otherwise it is added. */ - SubType& flip(const segment_type& interval_value_pair) - { - on_total_absorbable<SubType, Traits::is_total, Traits::absorbs_identities> - ::flip(*that(), interval_value_pair); - return *that(); - } - - //========================================================================== - //= Iterator related - //========================================================================== - - iterator lower_bound(const key_type& interval) - { return _map.lower_bound(interval); } - - iterator upper_bound(const key_type& interval) - { return _map.upper_bound(interval); } - - const_iterator lower_bound(const key_type& interval)const - { return _map.lower_bound(interval); } - - const_iterator upper_bound(const key_type& interval)const - { return _map.upper_bound(interval); } - - std::pair<iterator,iterator> equal_range(const key_type& interval) - { - return std::pair<iterator,iterator> - (lower_bound(interval), upper_bound(interval)); - } - - std::pair<const_iterator,const_iterator> - equal_range(const key_type& interval)const - { - return std::pair<const_iterator,const_iterator> - (lower_bound(interval), upper_bound(interval)); - } - - iterator begin() { return _map.begin(); } - iterator end() { return _map.end(); } - const_iterator begin()const { return _map.begin(); } - const_iterator end()const { return _map.end(); } - reverse_iterator rbegin() { return _map.rbegin(); } - reverse_iterator rend() { return _map.rend(); } - const_reverse_iterator rbegin()const { return _map.rbegin(); } - const_reverse_iterator rend()const { return _map.rend(); } - -private: - template<class Combiner> - iterator _add(const segment_type& interval_value_pair); - - template<class Combiner> - iterator _add(iterator prior_, const segment_type& interval_value_pair); - - template<class Combiner> - void _subtract(const segment_type& interval_value_pair); - - iterator _insert(const segment_type& interval_value_pair); - iterator _insert(iterator prior_, const segment_type& interval_value_pair); - -private: - template<class Combiner> - void add_segment(const interval_type& inter_val, const CodomainT& co_val, iterator& it_); - - template<class Combiner> - void add_main(interval_type& inter_val, const CodomainT& co_val, - iterator& it_, const iterator& last_); - - template<class Combiner> - void add_rear(const interval_type& inter_val, const CodomainT& co_val, iterator& it_); - - void add_front(const interval_type& inter_val, iterator& first_); - -private: - void subtract_front(const interval_type& inter_val, iterator& first_); - - template<class Combiner> - void subtract_main(const CodomainT& co_val, iterator& it_, const iterator& last_); - - template<class Combiner> - void subtract_rear(interval_type& inter_val, const CodomainT& co_val, iterator& it_); - -private: - void insert_main(const interval_type&, const CodomainT&, iterator&, const iterator&); - void erase_rest ( interval_type&, const CodomainT&, iterator&, const iterator&); - - template<class FragmentT> - void total_add_intersection(SubType& section, const FragmentT& fragment)const - { - section += *that(); - section.add(fragment); - } - - void partial_add_intersection(SubType& section, const segment_type& operand)const - { - interval_type inter_val = operand.first; - if(icl::is_empty(inter_val)) - return; - - std::pair<const_iterator, const_iterator> exterior = equal_range(inter_val); - if(exterior.first == exterior.second) - return; - - for(const_iterator it_=exterior.first; it_ != exterior.second; it_++) - { - interval_type common_interval = (*it_).first & inter_val; - if(!icl::is_empty(common_interval)) - { - section.template _add<codomain_combine> (value_type(common_interval, (*it_).second) ); - section.template _add<codomain_intersect>(value_type(common_interval, operand.second)); - } - } - } - - void partial_add_intersection(SubType& section, const element_type& operand)const - { - partial_add_intersection(section, make_segment<type>(operand)); - } - - -protected: - - template <class Combiner> - iterator gap_insert(iterator prior_, const interval_type& inter_val, - const codomain_type& co_val ) - { - // inter_val is not conained in this map. Insertion will be successful - BOOST_ASSERT(this->_map.find(inter_val) == this->_map.end()); - BOOST_ASSERT((!on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(co_val))); - return this->_map.insert(prior_, value_type(inter_val, version<Combiner>()(co_val))); - } - - template <class Combiner> - std::pair<iterator, bool> - add_at(const iterator& prior_, const interval_type& inter_val, - const codomain_type& co_val ) - { - // Never try to insert an identity element into an identity element absorber here: - BOOST_ASSERT((!(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(co_val)))); - - iterator inserted_ - = this->_map.insert(prior_, value_type(inter_val, Combiner::identity_element())); - - if((*inserted_).first == inter_val && (*inserted_).second == Combiner::identity_element()) - { - Combiner()((*inserted_).second, co_val); - return std::pair<iterator,bool>(inserted_, true); - } - else - return std::pair<iterator,bool>(inserted_, false); - } - - std::pair<iterator, bool> - insert_at(const iterator& prior_, const interval_type& inter_val, - const codomain_type& co_val ) - { - iterator inserted_ - = this->_map.insert(prior_, value_type(inter_val, co_val)); - - if(inserted_ == prior_) - return std::pair<iterator,bool>(inserted_, false); - else if((*inserted_).first == inter_val) - return std::pair<iterator,bool>(inserted_, true); - else - return std::pair<iterator,bool>(inserted_, false); - } - - -protected: - sub_type* that() { return static_cast<sub_type*>(this); } - const sub_type* that()const { return static_cast<const sub_type*>(this); } - -protected: - ImplMapT _map; - - -private: - //-------------------------------------------------------------------------- - template<class Type, bool is_total_invertible> - struct on_invertible; - - template<class Type> - struct on_invertible<Type, true> - { - typedef typename Type::segment_type segment_type; - typedef typename Type::inverse_codomain_combine inverse_codomain_combine; - - static void subtract(Type& object, const segment_type& operand) - { object.template _add<inverse_codomain_combine>(operand); } - }; - - template<class Type> - struct on_invertible<Type, false> - { - typedef typename Type::segment_type segment_type; - typedef typename Type::inverse_codomain_combine inverse_codomain_combine; - - static void subtract(Type& object, const segment_type& operand) - { object.template _subtract<inverse_codomain_combine>(operand); } - }; - - friend struct on_invertible<type, true>; - friend struct on_invertible<type, false>; - //-------------------------------------------------------------------------- - - //-------------------------------------------------------------------------- - template<class Type, bool is_total> - struct on_definedness; - - template<class Type> - struct on_definedness<Type, true> - { - static void add_intersection(Type& section, const Type& object, - const segment_type& operand) - { object.total_add_intersection(section, operand); } - }; - - template<class Type> - struct on_definedness<Type, false> - { - static void add_intersection(Type& section, const Type& object, - const segment_type& operand) - { object.partial_add_intersection(section, operand); } - }; - - friend struct on_definedness<type, true>; - friend struct on_definedness<type, false>; - //-------------------------------------------------------------------------- - - //-------------------------------------------------------------------------- - template<class Type, bool has_set_semantics> - struct on_codomain_model; - - template<class Type> - struct on_codomain_model<Type, true> - { - typedef typename Type::interval_type interval_type; - typedef typename Type::codomain_type codomain_type; - typedef typename Type::segment_type segment_type; - typedef typename Type::codomain_combine codomain_combine; - typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; - - static void add(Type& intersection, interval_type& common_interval, - const codomain_type& flip_value, const codomain_type& co_value) - { - codomain_type common_value = flip_value; - inverse_codomain_intersect()(common_value, co_value); - intersection.template - _add<codomain_combine>(segment_type(common_interval, common_value)); - } - }; - - template<class Type> - struct on_codomain_model<Type, false> - { - typedef typename Type::interval_type interval_type; - typedef typename Type::codomain_type codomain_type; - typedef typename Type::segment_type segment_type; - typedef typename Type::codomain_combine codomain_combine; - - static void add(Type& intersection, interval_type& common_interval, - const codomain_type&, const codomain_type&) - { - intersection.template - _add<codomain_combine>(segment_type(common_interval, - identity_element<codomain_type>::value())); - } - }; - - friend struct on_codomain_model<type, true>; - friend struct on_codomain_model<type, false>; - //-------------------------------------------------------------------------- - - - //-------------------------------------------------------------------------- - template<class Type, bool is_total, bool absorbs_identities> - struct on_total_absorbable; - - template<class Type> - struct on_total_absorbable<Type, true, true> - { - static void flip(Type& object, const typename Type::segment_type&) - { icl::clear(object); } - }; - -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4127) // conditional expression is constant -#endif - - template<class Type> - struct on_total_absorbable<Type, true, false> - { - typedef typename Type::segment_type segment_type; - typedef typename Type::codomain_type codomain_type; - - static void flip(Type& object, const segment_type& operand) - { - object += operand; - ICL_FORALL(typename Type, it_, object) - (*it_).second = identity_element<codomain_type>::value(); - - if(mpl::not_<is_interval_splitter<Type> >::value) - icl::join(object); - } - }; - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - - template<class Type, bool absorbs_identities> - struct on_total_absorbable<Type, false, absorbs_identities> - { - typedef typename Type::segment_type segment_type; - typedef typename Type::codomain_type codomain_type; - typedef typename Type::interval_type interval_type; - typedef typename Type::value_type value_type; - typedef typename Type::const_iterator const_iterator; - typedef typename Type::set_type set_type; - typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; - - static void flip(Type& object, const segment_type& interval_value_pair) - { - // That which is common shall be subtracted - // That which is not shall be added - // So interval_value_pair has to be 'complementary added' or flipped - interval_type span = interval_value_pair.first; - std::pair<const_iterator, const_iterator> exterior - = object.equal_range(span); - - const_iterator first_ = exterior.first; - const_iterator end_ = exterior.second; - - interval_type covered, left_over, common_interval; - const codomain_type& x_value = interval_value_pair.second; - const_iterator it_ = first_; - - set_type eraser; - Type intersection; - - while(it_ != end_ ) - { - const codomain_type& co_value = (*it_).second; - covered = (*it_++).first; - //[a ... : span - // [b ... : covered - //[a b) : left_over - left_over = right_subtract(span, covered); - - //That which is common ... - common_interval = span & covered; - if(!icl::is_empty(common_interval)) - { - // ... shall be subtracted - icl::add(eraser, common_interval); - - on_codomain_model<Type, has_set_semantics<codomain_type>::value> - ::add(intersection, common_interval, x_value, co_value); - } - - icl::add(object, value_type(left_over, x_value)); //That which is not shall be added - // Because this is a collision free addition I don't have to distinguish codomain_types. - - //... d) : span - //... c) : covered - // [c d) : span' - span = left_subtract(span, covered); - } - - //If span is not empty here, it is not in the set so it shall be added - icl::add(object, value_type(span, x_value)); - - //finally rewrite the common segments - icl::erase(object, eraser); - object += intersection; - } - }; - //-------------------------------------------------------------------------- -} ; - - -//============================================================================== -//= Addition detail -//============================================================================== -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::add_front(const interval_type& inter_val, iterator& first_) -{ - // If the collision sequence has a left residual 'left_resid' it will - // be split, to provide a standardized start of algorithms: - // The addend interval 'inter_val' covers the beginning of the collision sequence. - - // only for the first there can be a left_resid: a part of *first_ left of inter_val - interval_type left_resid = right_subtract((*first_).first, inter_val); - - if(!icl::is_empty(left_resid)) - { // [------------ . . . - // [left_resid---first_ --- . . . - iterator prior_ = cyclic_prior(*this, first_); - const_cast<interval_type&>((*first_).first) - = left_subtract((*first_).first, left_resid); - //NOTE: Only splitting - this->_map.insert(prior_, segment_type(left_resid, (*first_).second)); - } - //POST: - // [----- inter_val ---- . . . - // ...[-- first_ --... -} - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> - template<class Combiner> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::add_segment(const interval_type& inter_val, const CodomainT& co_val, iterator& it_) -{ - interval_type lead_gap = right_subtract(inter_val, (*it_).first); - if(!icl::is_empty(lead_gap)) - { - // [lead_gap--- . . . - // [-- it_ ... - iterator prior_ = it_==this->_map.begin()? it_ : prior(it_); - iterator inserted_ = this->template gap_insert<Combiner>(prior_, lead_gap, co_val); - that()->handle_inserted(prior_, inserted_); - } - - // . . . --------- . . . addend interval - // [-- it_ --) has a common part with the first overval - Combiner()((*it_).second, co_val); - that()->template handle_left_combined<Combiner>(it_++); -} - - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> - template<class Combiner> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::add_main(interval_type& inter_val, const CodomainT& co_val, - iterator& it_, const iterator& last_) -{ - interval_type cur_interval; - while(it_!=last_) - { - cur_interval = (*it_).first ; - add_segment<Combiner>(inter_val, co_val, it_); - // shrink interval - inter_val = left_subtract(inter_val, cur_interval); - } -} - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> - template<class Combiner> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::add_rear(const interval_type& inter_val, const CodomainT& co_val, iterator& it_) -{ - iterator prior_ = cyclic_prior(*that(), it_); - interval_type cur_itv = (*it_).first ; - - interval_type lead_gap = right_subtract(inter_val, cur_itv); - if(!icl::is_empty(lead_gap)) - { // [lead_gap--- . . . - // [prior) [-- it_ ... - iterator inserted_ = this->template gap_insert<Combiner>(prior_, lead_gap, co_val); - that()->handle_inserted(prior_, inserted_); - } - - interval_type end_gap = left_subtract(inter_val, cur_itv); - if(!icl::is_empty(end_gap)) - { - // [----------------end_gap) - // . . . -- it_ --) - Combiner()((*it_).second, co_val); - that()->template gap_insert_at<Combiner>(it_, prior_, end_gap, co_val); - } - else - { - // only for the last there can be a right_resid: a part of *it_ right of x - interval_type right_resid = left_subtract(cur_itv, inter_val); - - if(icl::is_empty(right_resid)) - { - // [---------------) - // [-- it_ ---) - Combiner()((*it_).second, co_val); - that()->template handle_preceeded_combined<Combiner>(prior_, it_); - } - else - { - // [--------------) - // [-- it_ --right_resid) - const_cast<interval_type&>((*it_).first) = right_subtract((*it_).first, right_resid); - - //NOTE: This is NOT an insertion that has to take care for correct application of - // the Combiner functor. It only reestablished that state after splitting the - // 'it_' interval value pair. Using _map_insert<Combiner> does not work here. - iterator insertion_ = this->_map.insert(it_, value_type(right_resid, (*it_).second)); - that()->handle_reinserted(insertion_); - - Combiner()((*it_).second, co_val); - that()->template handle_preceeded_combined<Combiner>(insertion_, it_); - } - } -} - - -//============================================================================== -//= Addition -//============================================================================== -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> - template<class Combiner> -inline typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::iterator - interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::_add(const segment_type& addend) -{ - typedef typename on_absorbtion<type,Combiner, - absorbs_identities<type>::value>::type on_absorbtion_; - - const interval_type& inter_val = addend.first; - if(icl::is_empty(inter_val)) - return this->_map.end(); - - const codomain_type& co_val = addend.second; - if(on_absorbtion_::is_absorbable(co_val)) - return this->_map.end(); - - std::pair<iterator,bool> insertion - = this->_map.insert(value_type(inter_val, version<Combiner>()(co_val))); - - if(insertion.second) - return that()->handle_inserted(insertion.first); - else - { - // Detect the first and the end iterator of the collision sequence - iterator first_ = this->_map.lower_bound(inter_val), - last_ = prior(this->_map.upper_bound(inter_val)); - //assert(end_ == this->_map.upper_bound(inter_val)); - iterator it_ = first_; - interval_type rest_interval = inter_val; - - add_front (rest_interval, it_ ); - add_main<Combiner>(rest_interval, co_val, it_, last_); - add_rear<Combiner>(rest_interval, co_val, it_ ); - return it_; - } -} - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> - template<class Combiner> -inline typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::iterator - interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::_add(iterator prior_, const segment_type& addend) -{ - typedef typename on_absorbtion<type,Combiner, - absorbs_identities<type>::value>::type on_absorbtion_; - - const interval_type& inter_val = addend.first; - if(icl::is_empty(inter_val)) - return prior_; - - const codomain_type& co_val = addend.second; - if(on_absorbtion_::is_absorbable(co_val)) - return prior_; - - std::pair<iterator,bool> insertion - = add_at<Combiner>(prior_, inter_val, co_val); - - if(insertion.second) - return that()->handle_inserted(insertion.first); - else - { - // Detect the first and the end iterator of the collision sequence - std::pair<iterator,iterator> overlap = equal_range(inter_val); - iterator it_ = overlap.first, - last_ = prior(overlap.second); - interval_type rest_interval = inter_val; - - add_front (rest_interval, it_ ); - add_main<Combiner>(rest_interval, co_val, it_, last_); - add_rear<Combiner>(rest_interval, co_val, it_ ); - return it_; - } -} - -//============================================================================== -//= Subtraction detail -//============================================================================== - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::subtract_front(const interval_type& inter_val, iterator& it_) -{ - interval_type left_resid = right_subtract((*it_).first, inter_val); - - if(!icl::is_empty(left_resid)) // [--- inter_val ---) - { //[prior_) [left_resid)[--- it_ . . . - iterator prior_ = cyclic_prior(*this, it_); - const_cast<interval_type&>((*it_).first) = left_subtract((*it_).first, left_resid); - this->_map.insert(prior_, value_type(left_resid, (*it_).second)); - // The segemnt *it_ is split at inter_val.first(), so as an invariant - // segment *it_ is always "under" inter_val and a left_resid is empty. - } -} - - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> - template<class Combiner> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::subtract_main(const CodomainT& co_val, iterator& it_, const iterator& last_) -{ - while(it_ != last_) - { - Combiner()((*it_).second, co_val); - that()->template handle_left_combined<Combiner>(it_++); - } -} - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> - template<class Combiner> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::subtract_rear(interval_type& inter_val, const CodomainT& co_val, iterator& it_) -{ - interval_type right_resid = left_subtract((*it_).first, inter_val); - - if(icl::is_empty(right_resid)) - { - Combiner()((*it_).second, co_val); - that()->template handle_combined<Combiner>(it_); - } - else - { - const_cast<interval_type&>((*it_).first) = right_subtract((*it_).first, right_resid); - iterator next_ = this->_map.insert(it_, value_type(right_resid, (*it_).second)); - Combiner()((*it_).second, co_val); - that()->template handle_succeeded_combined<Combiner>(it_, next_); - } -} - -//============================================================================== -//= Subtraction -//============================================================================== -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> - template<class Combiner> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::_subtract(const segment_type& minuend) -{ - interval_type inter_val = minuend.first; - if(icl::is_empty(inter_val)) - return; - - const codomain_type& co_val = minuend.second; - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable(co_val)) - return; - - std::pair<iterator, iterator> exterior = equal_range(inter_val); - if(exterior.first == exterior.second) - return; - - iterator last_ = prior(exterior.second); - iterator it_ = exterior.first; - subtract_front (inter_val, it_ ); - subtract_main <Combiner>( co_val, it_, last_); - subtract_rear <Combiner>(inter_val, co_val, it_ ); -} - -//============================================================================== -//= Insertion -//============================================================================== -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::insert_main(const interval_type& inter_val, const CodomainT& co_val, - iterator& it_, const iterator& last_) -{ - iterator end_ = boost::next(last_); - iterator prior_ = cyclic_prior(*this,it_), inserted_; - interval_type rest_interval = inter_val, left_gap, cur_itv; - interval_type last_interval = last_ ->first; - - while(it_ != end_ ) - { - cur_itv = (*it_).first ; - left_gap = right_subtract(rest_interval, cur_itv); - - if(!icl::is_empty(left_gap)) - { - inserted_ = this->_map.insert(prior_, value_type(left_gap, co_val)); - it_ = that()->handle_inserted(inserted_); - } - - // shrink interval - rest_interval = left_subtract(rest_interval, cur_itv); - prior_ = it_; - ++it_; - } - - //insert_rear(rest_interval, co_val, last_): - interval_type end_gap = left_subtract(rest_interval, last_interval); - if(!icl::is_empty(end_gap)) - { - inserted_ = this->_map.insert(prior_, value_type(end_gap, co_val)); - it_ = that()->handle_inserted(inserted_); - } - else - it_ = prior_; -} - - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -inline typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::iterator - interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::_insert(const segment_type& addend) -{ - interval_type inter_val = addend.first; - if(icl::is_empty(inter_val)) - return this->_map.end(); - - const codomain_type& co_val = addend.second; - if(on_codomain_absorbtion::is_absorbable(co_val)) - return this->_map.end(); - - std::pair<iterator,bool> insertion = this->_map.insert(addend); - - if(insertion.second) - return that()->handle_inserted(insertion.first); - else - { - // Detect the first and the end iterator of the collision sequence - iterator first_ = this->_map.lower_bound(inter_val), - last_ = prior(this->_map.upper_bound(inter_val)); - //assert((++last_) == this->_map.upper_bound(inter_val)); - iterator it_ = first_; - insert_main(inter_val, co_val, it_, last_); - return it_; - } -} - - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -inline typename interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>::iterator - interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::_insert(iterator prior_, const segment_type& addend) -{ - interval_type inter_val = addend.first; - if(icl::is_empty(inter_val)) - return prior_; - - const codomain_type& co_val = addend.second; - if(on_codomain_absorbtion::is_absorbable(co_val)) - return prior_; - - std::pair<iterator,bool> insertion = insert_at(prior_, inter_val, co_val); - - if(insertion.second) - return that()->handle_inserted(insertion.first); - { - // Detect the first and the end iterator of the collision sequence - std::pair<iterator,iterator> overlap = equal_range(inter_val); - iterator it_ = overlap.first, - last_ = prior(overlap.second); - insert_main(inter_val, co_val, it_, last_); - return it_; - } -} - -//============================================================================== -//= Erasure segment_type -//============================================================================== -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -inline void interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::erase_rest(interval_type& inter_val, const CodomainT& co_val, - iterator& it_, const iterator& last_) -{ - // For all intervals within loop: (*it_).first are contained_in inter_val - while(it_ != last_) - if((*it_).second == co_val) - this->_map.erase(it_++); - else it_++; - - //erase_rear: - if((*it_).second == co_val) - { - interval_type right_resid = left_subtract((*it_).first, inter_val); - if(icl::is_empty(right_resid)) - this->_map.erase(it_); - else - const_cast<interval_type&>((*it_).first) = right_resid; - } -} - -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -inline SubType& interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::erase(const segment_type& minuend) -{ - interval_type inter_val = minuend.first; - if(icl::is_empty(inter_val)) - return *that(); - - const codomain_type& co_val = minuend.second; - if(on_codomain_absorbtion::is_absorbable(co_val)) - return *that(); - - std::pair<iterator,iterator> exterior = equal_range(inter_val); - if(exterior.first == exterior.second) - return *that(); - - iterator first_ = exterior.first, end_ = exterior.second, - last_ = cyclic_prior(*this, end_); - iterator second_= first_; ++second_; - - if(first_ == last_) - { // [----inter_val----) - // .....first_==last_..... - // only for the last there can be a right_resid: a part of *it_ right of minuend - interval_type right_resid = left_subtract((*first_).first, inter_val); - - if((*first_).second == co_val) - { - interval_type left_resid = right_subtract((*first_).first, inter_val); - if(!icl::is_empty(left_resid)) // [----inter_val----) - { // [left_resid)..first_==last_...... - const_cast<interval_type&>((*first_).first) = left_resid; - if(!icl::is_empty(right_resid)) - this->_map.insert(first_, value_type(right_resid, co_val)); - } - else if(!icl::is_empty(right_resid)) - const_cast<interval_type&>((*first_).first) = right_resid; - else - this->_map.erase(first_); - } - } - else - { - // first AND NOT last - if((*first_).second == co_val) - { - interval_type left_resid = right_subtract((*first_).first, inter_val); - if(icl::is_empty(left_resid)) - this->_map.erase(first_); - else - const_cast<interval_type&>((*first_).first) = left_resid; - } - - erase_rest(inter_val, co_val, second_, last_); - } - - return *that(); -} - -//============================================================================== -//= Erasure key_type -//============================================================================== -template <class SubType, class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -inline SubType& interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> - ::erase(const interval_type& minuend) -{ - if(icl::is_empty(minuend)) - return *that(); - - std::pair<iterator, iterator> exterior = equal_range(minuend); - if(exterior.first == exterior.second) - return *that(); - - iterator first_ = exterior.first, - end_ = exterior.second, - last_ = prior(end_); - - interval_type left_resid = right_subtract((*first_).first, minuend); - interval_type right_resid = left_subtract(last_ ->first, minuend); - - if(first_ == last_ ) - if(!icl::is_empty(left_resid)) - { - const_cast<interval_type&>((*first_).first) = left_resid; - if(!icl::is_empty(right_resid)) - this->_map.insert(first_, value_type(right_resid, (*first_).second)); - } - else if(!icl::is_empty(right_resid)) - const_cast<interval_type&>((*first_).first) = left_subtract((*first_).first, minuend); - else - this->_map.erase(first_); - else - { // [-------- minuend ---------) - // [left_resid fst) . . . . [lst right_resid) - iterator second_= first_; ++second_; - - iterator start_ = icl::is_empty(left_resid)? first_: second_; - iterator stop_ = icl::is_empty(right_resid)? end_ : last_ ; - this->_map.erase(start_, stop_); //erase [start_, stop_) - - if(!icl::is_empty(left_resid)) - const_cast<interval_type&>((*first_).first) = left_resid; - - if(!icl::is_empty(right_resid)) - const_cast<interval_type&>(last_ ->first) = right_resid; - } - - return *that(); -} - -//----------------------------------------------------------------------------- -// type traits -//----------------------------------------------------------------------------- -template -< - class SubType, - class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc -> -struct is_map<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_map<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template -< - class SubType, - class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc -> -struct has_inverse<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef has_inverse<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (has_inverse<CodomainT>::value)); -}; - -template -< - class SubType, - class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc -> -struct is_interval_container<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_interval_container<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template -< - class SubType, - class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc -> -struct absorbs_identities<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef absorbs_identities<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities)); -}; - -template -< - class SubType, - class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc -> -struct is_total<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_total<icl::interval_base_map<SubType,DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total)); -}; - - - -}} // namespace icl boost - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/interval_map.hpp b/contrib/restricted/boost/boost/icl/interval_map.hpp deleted file mode 100644 index ffddc3ed365..00000000000 --- a/contrib/restricted/boost/boost/icl/interval_map.hpp +++ /dev/null @@ -1,297 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2008-2012: 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_INTERVAL_MAP_HPP_JOFA_080705 -#define BOOST_ICL_INTERVAL_MAP_HPP_JOFA_080705 - -#include <boost/assert.hpp> -#include <boost/icl/type_traits/is_map.hpp> -#include <boost/icl/interval_set.hpp> -#include <boost/icl/interval_base_map.hpp> - -namespace boost{namespace icl -{ - -template<class DomainT, class CodomainT, class Traits, - ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, - ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -class split_interval_map; - -/** \brief implements a map as a map of intervals - on insertion - overlapping intervals are split and associated values are combined.*/ -template -< - typename DomainT, - typename CodomainT, - class Traits = icl::partial_absorber, - ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT), - ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT), - ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT), - ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), - ICL_ALLOC Alloc = std::allocator -> -class interval_map: - - public interval_base_map<interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>, - DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> -{ -public: - typedef Traits traits; - typedef interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> type; - typedef split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> split_type; - typedef type overloadable_type; - typedef type joint_type; - typedef interval_base_map<type, - DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> base_type; - - typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename base_type::element_type element_type; - typedef typename base_type::segment_type segment_type; - typedef typename base_type::domain_type domain_type; - typedef typename base_type::codomain_type codomain_type; - typedef typename base_type::domain_mapping_type domain_mapping_type; - typedef typename base_type::interval_mapping_type interval_mapping_type; - typedef typename base_type::ImplMapT ImplMapT; - - typedef typename base_type::size_type size_type; - typedef typename base_type::codomain_combine codomain_combine; - - typedef interval_set<DomainT,Compare,Interval,Alloc> interval_set_type; - typedef interval_set_type set_type; - typedef set_type key_object_type; - - enum { fineness = 1 }; - -public: - //========================================================================== - //= Construct, copy, destruct - //========================================================================== - - /// Default constructor for the empty object - interval_map(): base_type() {} - - /// Copy constructor - interval_map(const interval_map& src): base_type(src) {} - - /// Copy constructor for base_type - template<class SubType> - explicit interval_map - (const interval_base_map<SubType,DomainT,CodomainT, - Traits,Compare,Combine,Section,Interval,Alloc>& src) - { this->assign(src); } - - explicit interval_map(const domain_mapping_type& base_pair): base_type() - { this->add(base_pair); } - - explicit interval_map(const value_type& value_pair): base_type() - { this->add(value_pair); } - - - /// Assignment from a base interval_map. - template<class SubType> - void assign(const interval_base_map<SubType,DomainT,CodomainT, - Traits,Compare,Combine,Section,Interval,Alloc>& src) - { - typedef interval_base_map<SubType,DomainT,CodomainT, - Traits,Compare,Combine,Section,Interval,Alloc> base_map_type; - this->clear(); - iterator prior_ = this->_map.end(); - ICL_const_FORALL(typename base_map_type, it_, src) - prior_ = this->add(prior_, *it_); - } - - /// Assignment operator for base type - template<class SubType> - interval_map& operator = - (const interval_base_map<SubType,DomainT,CodomainT, - Traits,Compare,Combine,Section,Interval,Alloc>& src) - { - this->assign(src); - return *this; - } - -# ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - //========================================================================== - //= Move semantics - //========================================================================== - - /// Move constructor - interval_map(interval_map&& src) - : base_type(boost::move(src)) - {} - - /// Move assignment operator - interval_map& operator = (interval_map src) - { - base_type::operator=(boost::move(src)); - return *this; - } - - //========================================================================== -# else - - /// Assignment operator - interval_map& operator = (const interval_map& src) - { - base_type::operator=(src); - return *this; - } - -# endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - -private: - // Private functions that shall be accessible by the baseclass: - friend class - interval_base_map <interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>, - DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>; - - iterator handle_inserted(iterator it_) - { - return segmental::join_neighbours(*this, it_); - } - - void handle_inserted(iterator prior_, iterator it_) - { - if(prior_ != this->_map.end() && segmental::joinable(*this, prior_, it_)) - segmental::join_on_right(*this, prior_, it_); - } - - template<class Combiner> - void handle_left_combined(iterator it_) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - this->_map.erase(it_); - else - segmental::join_left(*this, it_); - } - - template<class Combiner> - void handle_combined(iterator it_) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - this->_map.erase(it_); - else - segmental::join_neighbours(*this, it_); - } - - template<class Combiner> - void handle_preceeded_combined(iterator prior_, iterator& it_) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - { - this->_map.erase(it_); - it_ = prior_; - } - else // After a new combination (e.g. combiner=max) joining neighbours may be possible - segmental::join_neighbours(*this, it_); - } - - template<class Combiner> - void handle_succeeded_combined(iterator it_, iterator next_) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - { - this->_map.erase(it_); - segmental::join_right(*this, next_); - } - else - { - segmental::join_left(*this, it_); - segmental::join_neighbours(*this, next_); - } - } - - - - void handle_reinserted(iterator insertion_) - { - segmental::join_right(*this, insertion_); - } - - - template<class Combiner> - void gap_insert_at(iterator& it_, iterator prior_, - const interval_type& end_gap, const codomain_type& co_val) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - { - this->_map.erase(it_); - it_ = this->template gap_insert<Combiner>(prior_, end_gap, co_val); - segmental::join_right(*this, it_); - } - else - { - segmental::join_left(*this, it_); - iterator inserted_ = this->template gap_insert<Combiner>(it_, end_gap, co_val); - it_ = segmental::join_neighbours(*this, inserted_); - } - } - -} ; - - -//----------------------------------------------------------------------------- -// type traits -//----------------------------------------------------------------------------- -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_map<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_map<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct has_inverse<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef has_inverse<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (has_inverse<CodomainT>::value)); -}; - - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_interval_container<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_interval_container<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct absorbs_identities<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef absorbs_identities<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities)); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_total<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_total<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total)); -}; - - -//----------------------------------------------------------------------------- -// type representation -//----------------------------------------------------------------------------- -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct type_to_string<icl::interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - static std::string apply() - { - return "itv_map<"+ type_to_string<DomainT>::apply() + "," - + type_to_string<CodomainT>::apply() + "," - + type_to_string<Traits>::apply() + ">"; - } -}; - -}} // namespace icl boost - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/map.hpp b/contrib/restricted/boost/boost/icl/map.hpp deleted file mode 100644 index 6f3c851098a..00000000000 --- a/contrib/restricted/boost/boost/icl/map.hpp +++ /dev/null @@ -1,703 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-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_MAP_HPP_JOFA_070519 -#define BOOST_ICL_MAP_HPP_JOFA_070519 - -#include <boost/icl/impl_config.hpp> - -#if defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION) -# include <boost/container/map.hpp> -# include <boost/container/set.hpp> -#elif defined(ICL_USE_STD_IMPLEMENTATION) -# include <map> -# include <set> -#else // Default for implementing containers -# include <map> -# include <set> -#endif - -#include <string> -#include <boost/call_traits.hpp> -#include <boost/icl/detail/notate.hpp> -#include <boost/icl/detail/design_config.hpp> -#include <boost/icl/detail/concept_check.hpp> -#include <boost/icl/detail/on_absorbtion.hpp> -#include <boost/icl/type_traits/is_map.hpp> -#include <boost/icl/type_traits/absorbs_identities.hpp> -#include <boost/icl/type_traits/is_total.hpp> -#include <boost/icl/type_traits/is_element_container.hpp> -#include <boost/icl/type_traits/has_inverse.hpp> -#include <boost/icl/type_traits/to_string.hpp> - -#include <boost/icl/associative_element_container.hpp> -#include <boost/icl/functors.hpp> - -namespace boost{namespace icl -{ - -struct partial_absorber -{ - enum { absorbs_identities = true }; - enum { is_total = false }; -}; - -template<> -inline std::string type_to_string<partial_absorber>::apply() { return "@0"; } - -struct partial_enricher -{ - enum { absorbs_identities = false }; - enum { is_total = false }; -}; - -template<> -inline std::string type_to_string<partial_enricher>::apply() { return "e0"; } - -struct total_absorber -{ - enum { absorbs_identities = true }; - enum { is_total = true }; -}; - -template<> -inline std::string type_to_string<total_absorber>::apply() { return "^0"; } - -struct total_enricher -{ - enum { absorbs_identities = false }; - enum { is_total = true }; -}; - -template<> -inline std::string type_to_string<total_enricher>::apply() { return "e^0"; } - - - -/** \brief Addable, subractable and intersectable maps */ -template -< - typename DomainT, - typename CodomainT, - class Traits = icl::partial_absorber, - ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT), - ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT), - ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT), - ICL_ALLOC Alloc = std::allocator -> -class map: private ICL_IMPL_SPACE::map<DomainT, CodomainT, ICL_COMPARE_DOMAIN(Compare,DomainT), - Alloc<std::pair<const DomainT, CodomainT> > > -{ -public: - typedef Alloc<typename std::pair<const DomainT, CodomainT> > allocator_type; - - 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 Traits traits; - -public: - typedef DomainT domain_type; - typedef typename boost::call_traits<DomainT>::param_type domain_param; - typedef DomainT key_type; - typedef CodomainT codomain_type; - typedef CodomainT mapped_type; - typedef CodomainT data_type; - typedef std::pair<const DomainT, CodomainT> element_type; - typedef std::pair<const DomainT, CodomainT> value_type; - typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; - typedef ICL_COMBINE_CODOMAIN(Combine,CodomainT) codomain_combine; - typedef domain_compare key_compare; - typedef ICL_COMPARE_DOMAIN(Compare,element_type) element_compare; - typedef typename inverse<codomain_combine >::type inverse_codomain_combine; - typedef typename mpl::if_ - <has_set_semantics<codomain_type> - , ICL_SECTION_CODOMAIN(Section,CodomainT) - , codomain_combine - >::type codomain_intersect; - typedef typename inverse<codomain_intersect>::type inverse_codomain_intersect; - typedef typename base_type::value_compare value_compare; - - typedef typename ICL_IMPL_SPACE::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, - total_invertible = (mpl::and_<is_total<type>, has_inverse<codomain_type> >::value)); - - typedef on_absorbtion<type,codomain_combine,Traits::absorbs_identities> - on_identity_absorbtion; - -public: - typedef typename base_type::pointer pointer; - typedef typename base_type::const_pointer const_pointer; - typedef typename base_type::reference reference; - typedef typename base_type::const_reference const_reference; - typedef typename base_type::iterator iterator; - typedef typename base_type::const_iterator const_iterator; - typedef typename base_type::size_type size_type; - typedef typename base_type::difference_type difference_type; - typedef typename base_type::reverse_iterator reverse_iterator; - typedef typename base_type::const_reverse_iterator const_reverse_iterator; - -public: - BOOST_STATIC_CONSTANT(bool, - is_total_invertible = ( Traits::is_total - && has_inverse<codomain_type>::value)); - - BOOST_STATIC_CONSTANT(int, fineness = 4); - -public: - //========================================================================== - //= Construct, copy, destruct - //========================================================================== - map() - { - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>)); - BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>)); - } - - map(const key_compare& comp): base_type(comp){} - - template <class InputIterator> - map(InputIterator first, InputIterator past) - : base_type(first,past){} - - template <class InputIterator> - map(InputIterator first, InputIterator past, const key_compare& comp) - : base_type(first,past,comp) - {} - - map(const map& src) - : base_type(src) - { - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>)); - BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>)); - } - - explicit map(const element_type& key_value_pair): base_type::map() - { - insert(key_value_pair); - } - -# ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - //========================================================================== - //= Move semantics - //========================================================================== - - map(map&& src) - : base_type(boost::move(src)) - { - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((LessThanComparableConcept<DomainT>)); - BOOST_CONCEPT_ASSERT((DefaultConstructibleConcept<CodomainT>)); - BOOST_CONCEPT_ASSERT((EqualComparableConcept<CodomainT>)); - } - - map& operator = (map src) - { - base_type::operator=(boost::move(src)); - return *this; - } - //========================================================================== -# else - - map& operator = (const map& src) - { - base_type::operator=(src); - return *this; - } - -# endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - - void swap(map& src) { base_type::swap(src); } - - //========================================================================== - using base_type::empty; - using base_type::clear; - - using base_type::begin; - using base_type::end; - using base_type::rbegin; - using base_type::rend; - - using base_type::size; - using base_type::max_size; - - using base_type::key_comp; - using base_type::value_comp; - - using base_type::erase; - using base_type::find; - using base_type::count; - - using base_type::lower_bound; - using base_type::upper_bound; - using base_type::equal_range; - - using base_type::operator[]; - -public: - //========================================================================== - //= Containedness - //========================================================================== - - template<class SubObject> - bool contains(const SubObject& sub)const - { return icl::contains(*this, sub); } - - bool within(const map& super)const - { return icl::contains(super, *this); } - - //========================================================================== - //= Size - //========================================================================== - /** \c iterative_size() yields the number of elements that is visited - throu complete iteration. For interval sets \c iterative_size() is - different from \c size(). */ - std::size_t iterative_size()const { return base_type::size(); } - - //========================================================================== - //= Selection - //========================================================================== - - /** Total select function. */ - codomain_type operator()(const domain_type& key)const - { - const_iterator it = find(key); - return it==end() ? identity_element<codomain_type>::value() - : it->second; - } - - //========================================================================== - //= Addition - //========================================================================== - /** \c add inserts \c value_pair into the map if it's key does - not exist in the map. - If \c value_pairs's key value exists in the map, it's data - value is added to the data value already found in the map. */ - map& add(const value_type& value_pair) - { - return _add<codomain_combine>(value_pair); - } - - /** \c add add \c value_pair into the map using \c prior as a hint to - insert \c value_pair after the position \c prior is pointing to. */ - iterator add(iterator prior, const value_type& value_pair) - { - return _add<codomain_combine>(prior, value_pair); - } - - //========================================================================== - //= Subtraction - //========================================================================== - /** If the \c value_pair's key value is in the map, it's data value is - subtraced from the data value stored in the map. */ - map& subtract(const element_type& value_pair) - { - on_invertible<type, is_total_invertible> - ::subtract(*this, value_pair); - return *this; - } - - map& subtract(const domain_type& key) - { - icl::erase(*this, key); - return *this; - } - - //========================================================================== - //= Insertion, erasure - //========================================================================== - std::pair<iterator,bool> insert(const value_type& value_pair) - { - if(on_identity_absorbtion::is_absorbable(value_pair.second)) - return std::pair<iterator,bool>(end(),true); - else - return base_type::insert(value_pair); - } - - iterator insert(iterator prior, const value_type& value_pair) - { - if(on_identity_absorbtion::is_absorbable(value_pair.second)) - return end(); - else - return base_type::insert(prior, value_pair); - } - - template<class Iterator> - iterator insert(Iterator first, Iterator last) - { - iterator prior = end(), it = first; - while(it != last) - prior = this->insert(prior, *it++); - } - - /** With <tt>key_value_pair = (k,v)</tt> set value \c v for key \c k */ - map& set(const element_type& key_value_pair) - { - return icl::set_at(*this, key_value_pair); - } - - /** erase \c key_value_pair from the map. - Erase only if, the exact value content \c val is stored for the given key. */ - size_type erase(const element_type& key_value_pair) - { - return icl::erase(*this, key_value_pair); - } - - //========================================================================== - //= Intersection - //========================================================================== - /** The intersection of \c key_value_pair and \c *this map is added to \c section. */ - void add_intersection(map& section, const element_type& key_value_pair)const - { - on_definedness<type, Traits::is_total> - ::add_intersection(section, *this, key_value_pair); - } - - //========================================================================== - //= Symmetric difference - //========================================================================== - - map& flip(const element_type& operand) - { - on_total_absorbable<type,_total,_absorbs>::flip(*this, operand); - return *this; - } - -private: - template<class Combiner> - map& _add(const element_type& value_pair); - - template<class Combiner> - iterator _add(iterator prior, const element_type& value_pair); - - template<class Combiner> - map& _subtract(const element_type& value_pair); - - template<class FragmentT> - void total_add_intersection(type& section, const FragmentT& fragment)const - { - section += *this; - section.add(fragment); - } - - void partial_add_intersection(type& section, const element_type& operand)const - { - const_iterator it_ = find(operand.first); - if(it_ != end()) - { - section.template _add<codomain_combine >(*it_); - section.template _add<codomain_intersect>(operand); - } - } - - -private: - //-------------------------------------------------------------------------- - template<class Type, bool is_total_invertible> - struct on_invertible; - - template<class Type> - struct on_invertible<Type, true> - { - typedef typename Type::element_type element_type; - typedef typename Type::inverse_codomain_combine inverse_codomain_combine; - - static void subtract(Type& object, const element_type& operand) - { object.template _add<inverse_codomain_combine>(operand); } - }; - - template<class Type> - struct on_invertible<Type, false> - { - typedef typename Type::element_type element_type; - typedef typename Type::inverse_codomain_combine inverse_codomain_combine; - - static void subtract(Type& object, const element_type& operand) - { object.template _subtract<inverse_codomain_combine>(operand); } - }; - - friend struct on_invertible<type, true>; - friend struct on_invertible<type, false>; - //-------------------------------------------------------------------------- - - //-------------------------------------------------------------------------- - template<class Type, bool is_total> - struct on_definedness; - - template<class Type> - struct on_definedness<Type, true> - { - static void add_intersection(Type& section, const Type& object, - const element_type& operand) - { object.total_add_intersection(section, operand); } - }; - - template<class Type> - struct on_definedness<Type, false> - { - static void add_intersection(Type& section, const Type& object, - const element_type& operand) - { object.partial_add_intersection(section, operand); } - }; - - friend struct on_definedness<type, true>; - friend struct on_definedness<type, false>; - //-------------------------------------------------------------------------- - - //-------------------------------------------------------------------------- - template<class Type, bool has_set_semantics, bool absorbs_identities> - struct on_codomain_model; - - template<class Type> - struct on_codomain_model<Type, false, false> - { // !codomain_is_set, !absorbs_identities - static void subtract(Type&, typename Type::iterator it_, - const typename Type::codomain_type& ) - { (*it_).second = identity_element<typename Type::codomain_type>::value(); } - }; - - template<class Type> - struct on_codomain_model<Type, false, true> - { // !codomain_is_set, absorbs_identities - static void subtract(Type& object, typename Type::iterator it_, - const typename Type::codomain_type& ) - { object.erase(it_); } - }; - - template<class Type> - struct on_codomain_model<Type, true, false> - { // !codomain_is_set, !absorbs_identities - typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; - static void subtract(Type&, typename Type::iterator it_, - const typename Type::codomain_type& co_value) - { - inverse_codomain_intersect()((*it_).second, co_value); - } - }; - - template<class Type> - struct on_codomain_model<Type, true, true> - { // !codomain_is_set, absorbs_identities - typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; - static void subtract(Type& object, typename Type::iterator it_, - const typename Type::codomain_type& co_value) - { - inverse_codomain_intersect()((*it_).second, co_value); - if((*it_).second == identity_element<codomain_type>::value()) - object.erase(it_); - } - }; - //-------------------------------------------------------------------------- - - //-------------------------------------------------------------------------- - template<class Type, bool is_total, bool absorbs_identities> - struct on_total_absorbable; - - template<class Type> - struct on_total_absorbable<Type, true, true> - { - typedef typename Type::element_type element_type; - static void flip(Type& object, const typename Type::element_type&) - { icl::clear(object); } - }; - - template<class Type> - struct on_total_absorbable<Type, true, false> - { - typedef typename Type::element_type element_type; - typedef typename Type::codomain_type codomain_type; - - static void flip(Type& object, const element_type& operand) - { - object.add(operand); - ICL_FORALL(typename Type, it_, object) - (*it_).second = identity_element<codomain_type>::value(); - } - }; - - template<class Type> - struct on_total_absorbable<Type, false, true> - { // !is_total, absorbs_identities - typedef typename Type::element_type element_type; - typedef typename Type::codomain_type codomain_type; - typedef typename Type::iterator iterator; - typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; - - static void flip(Type& object, const element_type& operand) - { - std::pair<iterator,bool> insertion = object.insert(operand); - if(!insertion.second) - on_codomain_model<Type, has_set_semantics<codomain_type>::value, true> - ::subtract(object, insertion.first, operand.second); - } - }; - - template<class Type> - struct on_total_absorbable<Type, false, false> - { // !is_total !absorbs_identities - typedef typename Type::element_type element_type; - typedef typename Type::codomain_type codomain_type; - typedef typename Type::iterator iterator; - typedef typename Type::inverse_codomain_intersect inverse_codomain_intersect; - - static void flip(Type& object, const element_type& operand) - { - std::pair<iterator,bool> insertion = object.insert(operand); - if(!insertion.second) - on_codomain_model<Type, has_set_semantics<codomain_type>::value, false> - ::subtract(object, insertion.first, operand.second); - } - }; - - friend struct on_total_absorbable<type, true, true >; - friend struct on_total_absorbable<type, false, true >; - friend struct on_total_absorbable<type, true, false>; - friend struct on_total_absorbable<type, false, false>; - //-------------------------------------------------------------------------- -}; - - - -//============================================================================== -//= Addition<ElementMap> -//============================================================================== -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc> - template <class Combiner> -map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& - map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> - ::_add(const element_type& addend) -{ - typedef typename on_absorbtion - <type,Combiner,absorbs_identities<type>::value>::type on_absorbtion_; - - const codomain_type& co_val = addend.second; - if(on_absorbtion_::is_absorbable(co_val)) - return *this; - - std::pair<iterator,bool> insertion - = base_type::insert(value_type(addend.first, version<Combiner>()(co_val))); - - if(!insertion.second) - { - iterator it = insertion.first; - Combiner()((*it).second, co_val); - - if(on_absorbtion_::is_absorbable((*it).second)) - erase(it); - } - return *this; -} - - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc> - template <class Combiner> -typename map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::iterator - map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> - ::_add(iterator prior_, const value_type& addend) -{ - typedef typename on_absorbtion - <type,Combiner,absorbs_identities<type>::value>::type on_absorbtion_; - - const codomain_type& co_val = addend.second; - if(on_absorbtion_::is_absorbable(co_val)) - return end(); - - iterator inserted_ - = base_type::insert(prior_, - value_type(addend.first, Combiner::identity_element())); - Combiner()((*inserted_).second, addend.second); - - if(on_absorbtion_::is_absorbable((*inserted_).second)) - { - erase(inserted_); - return end(); - } - else - return inserted_; -} - - -//============================================================================== -//= Subtraction<ElementMap> -//============================================================================== -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc> - template <class Combiner> -map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& - map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>::_subtract(const value_type& minuend) -{ - typedef typename on_absorbtion - <type,Combiner,absorbs_identities<type>::value>::type on_absorbtion_; - - iterator it_ = find(minuend.first); - if(it_ != end()) - { - Combiner()((*it_).second, minuend.second); - if(on_absorbtion_::is_absorbable((*it_).second)) - erase(it_); - } - return *this; -} - - -//----------------------------------------------------------------------------- -// type traits -//----------------------------------------------------------------------------- -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc> -struct is_map<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > -{ - typedef is_map<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc> -struct has_inverse<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > -{ - typedef has_inverse<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (has_inverse<CodomainT>::value)); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc> -struct absorbs_identities<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > -{ - typedef absorbs_identities type; - BOOST_STATIC_CONSTANT(int, value = Traits::absorbs_identities); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc> -struct is_total<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > -{ - typedef is_total type; - BOOST_STATIC_CONSTANT(int, value = Traits::is_total); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_ALLOC Alloc> -struct type_to_string<icl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> > -{ - static std::string apply() - { - return "map<"+ type_to_string<DomainT>::apply() + "," - + type_to_string<CodomainT>::apply() + "," - + type_to_string<Traits>::apply() +">"; - } -}; - - - -}} // namespace icl boost - -#endif // BOOST_ICL_MAP_HPP_JOFA_070519 - diff --git a/contrib/restricted/boost/boost/icl/predicates/distinct_equal.hpp b/contrib/restricted/boost/boost/icl/predicates/distinct_equal.hpp deleted file mode 100644 index a74617534a4..00000000000 --- a/contrib/restricted/boost/boost/icl/predicates/distinct_equal.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_PREDICATES_DISTINCT_EQUAL_HPP_JOFA_101102 -#define BOOST_ICL_PREDICATES_DISTINCT_EQUAL_HPP_JOFA_101102 - -#include <boost/icl/type_traits/predicate.hpp> -#include <boost/icl/type_traits/type_to_string.hpp> - -namespace boost{namespace icl -{ - template <class Type> - struct distinct_equal : public relation<Type,Type> - { - bool operator()(const Type& lhs, const Type& rhs)const - { - return is_distinct_equal(lhs, rhs); - } - }; - - template<> - inline std::string unary_template_to_string<icl::distinct_equal>::apply() - { return "==/0"; } - -}} // namespace icl boost - -#endif - diff --git a/contrib/restricted/boost/boost/icl/predicates/element_equal.hpp b/contrib/restricted/boost/boost/icl/predicates/element_equal.hpp deleted file mode 100644 index c25b1935ed0..00000000000 --- a/contrib/restricted/boost/boost/icl/predicates/element_equal.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_PREDICATES_ELEMENT_EQUAL_HPP_JOFA_101102 -#define BOOST_ICL_PREDICATES_ELEMENT_EQUAL_HPP_JOFA_101102 - -#include <boost/icl/type_traits/predicate.hpp> -#include <boost/icl/type_traits/type_to_string.hpp> - -namespace boost{namespace icl -{ - template <class Type> - struct element_equal : public relation<Type,Type> - { - bool operator()(const Type& lhs, const Type& rhs)const - { - return is_element_equal(lhs, rhs); - } - }; - - template<> - inline std::string unary_template_to_string<icl::element_equal>::apply() - { return "="; } - -}} // namespace icl boost - -#endif - diff --git a/contrib/restricted/boost/boost/icl/predicates/std_equal.hpp b/contrib/restricted/boost/boost/icl/predicates/std_equal.hpp deleted file mode 100644 index cdce3e75db4..00000000000 --- a/contrib/restricted/boost/boost/icl/predicates/std_equal.hpp +++ /dev/null @@ -1,33 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_PREDICATES_STD_EQUAL_HPP_JOFA_101102 -#define BOOST_ICL_PREDICATES_STD_EQUAL_HPP_JOFA_101102 - -#include <boost/icl/type_traits/predicate.hpp> -#include <boost/icl/type_traits/type_to_string.hpp> - -namespace boost{namespace icl -{ - template <class Type> struct std_equal : public relation<Type,Type> - { - bool operator()(const Type& lhs, const Type& rhs)const - { - return lhs == rhs; - } - }; - - //----------------------------------------------------------------------------- - - template<> - inline std::string unary_template_to_string<icl::std_equal>::apply() - { return "=="; } - -}} // namespace icl boost - -#endif - diff --git a/contrib/restricted/boost/boost/icl/predicates/sub_super_set.hpp b/contrib/restricted/boost/boost/icl/predicates/sub_super_set.hpp deleted file mode 100644 index e06da211bf5..00000000000 --- a/contrib/restricted/boost/boost/icl/predicates/sub_super_set.hpp +++ /dev/null @@ -1,54 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_PREDICATES_SUB_SUPER_SET_HPP_JOFA_101102 -#define BOOST_ICL_PREDICATES_SUB_SUPER_SET_HPP_JOFA_101102 - -#include <boost/icl/type_traits/predicate.hpp> -#include <boost/icl/type_traits/type_to_string.hpp> - -namespace boost{namespace icl -{ - - /// Functor class template contained_in implements the subset relation. - template<class Type> - struct sub_super_set : public relation<Type,Type> - { - /// Apply the subset relation. - /** <tt>contained_in(sub, super)</tt> is true if <tt>sub</tt> - is contained in <tt>super</tt> */ - bool operator()(const Type& sub, const Type& super)const - { - return contains(super, sub); - } - }; - - template<> - inline std::string unary_template_to_string<icl::sub_super_set>::apply() - { return "C="; } - - /// Functor class template <b>contains</b> implements the superset relation. - template<class Type> - struct super_sub_set : public relation<Type,Type> - { - /// Apply the superset relation. - /** <tt>contains(super, sub)</tt> is true if <tt>super</tt> containes - <tt>sub</tt> */ - bool operator()(const Type& super, const Type& sub)const - { - return contains(super, sub); - } - }; - - template<> - inline std::string unary_template_to_string<icl::super_sub_set>::apply() - { return "D="; } - -}} // namespace icl boost - -#endif - diff --git a/contrib/restricted/boost/boost/icl/ptime.hpp b/contrib/restricted/boost/boost/icl/ptime.hpp deleted file mode 100644 index 42c2235ec29..00000000000 --- a/contrib/restricted/boost/boost/icl/ptime.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------------ -itl_ptime provides adapter code for boost::posix_time::ptime. -It implements incrementation (++) decrementation (--) and a neutral element -w.r.t. addition (identity_element()). -------------------------------------------------------------------------------*/ - -#ifndef BOOST_ICL_PTIME_HPP_JOFA_080416 -#define BOOST_ICL_PTIME_HPP_JOFA_080416 - -#include <boost/icl/detail/boost_config.hpp> -#include <boost/detail/workaround.hpp> - -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4100) // boost/date_time/time.hpp(80) : warning C4100: 'as_offset' : unreferenced formal parameter -#pragma warning(disable:4127) // conditional expression is constant -#pragma warning(disable:4244) // 'argument' : conversion from 'int' to 'unsigned short', possible loss of data -#pragma warning(disable:4702) // boost\lexical_cast.hpp(1159) : warning C4702: unreachable code -#pragma warning(disable:4996) // Function call with parameters that may be unsafe - this call relies on the caller to check that the passed values are correct. To disable this warning, use -D_SCL_SECURE_NO_WARNINGS. See documentation on how to use Visual C++ 'Checked Iterators' -#endif - -#include <stdio.h> -#include <string> -#include <sstream> -#include <iostream> -#include <boost/date_time/posix_time/posix_time.hpp> - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include <boost/icl/type_traits/identity_element.hpp> -#include <boost/icl/type_traits/difference_type_of.hpp> -#include <boost/icl/type_traits/size_type_of.hpp> -#include <boost/icl/type_traits/is_discrete.hpp> - -namespace boost{namespace icl -{ - template<> struct is_discrete<boost::posix_time::ptime> - { - typedef is_discrete type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<> - inline boost::posix_time::ptime identity_element<boost::posix_time::ptime>::value() - { - return boost::posix_time::ptime(boost::posix_time::min_date_time); - } - - template<> - struct has_difference<boost::posix_time::ptime> - { - typedef has_difference type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<> - struct difference_type_of<boost::posix_time::ptime> - { - typedef boost::posix_time::time_duration type; - }; - - template<> - struct size_type_of<boost::posix_time::ptime> - { - typedef boost::posix_time::time_duration type; - }; - - // ------------------------------------------------------------------------ - inline boost::posix_time::ptime operator ++(boost::posix_time::ptime& x) - { - return x += boost::posix_time::ptime::time_duration_type::unit(); - } - - inline boost::posix_time::ptime operator --(boost::posix_time::ptime& x) - { - return x -= boost::posix_time::ptime::time_duration_type::unit(); - } - - // ------------------------------------------------------------------------ - template<> struct is_discrete<boost::posix_time::time_duration> - { - typedef is_discrete type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<> - struct has_difference<boost::posix_time::time_duration> - { - typedef has_difference type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<> - struct size_type_of<boost::posix_time::time_duration> - { - typedef boost::posix_time::time_duration type; - }; - - inline boost::posix_time::time_duration operator ++(boost::posix_time::time_duration& x) - { - return x += boost::posix_time::ptime::time_duration_type::unit(); - } - - inline boost::posix_time::time_duration operator --(boost::posix_time::time_duration& x) - { - return x -= boost::posix_time::ptime::time_duration_type::unit(); - } -}} // namespace icl boost - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/rational.hpp b/contrib/restricted/boost/boost/icl/rational.hpp deleted file mode 100644 index fd63cc98ce4..00000000000 --- a/contrib/restricted/boost/boost/icl/rational.hpp +++ /dev/null @@ -1,70 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ - -/*------------------------------------------------------------------------------ -itl_rational provides adapter code for boost::rational. -------------------------------------------------------------------------------*/ - -#ifndef BOOST_ICL_RATIONAL_HPP_JOFA_080913 -#define BOOST_ICL_RATIONAL_HPP_JOFA_080913 - -#include <boost/config.hpp> // For BOOST_MSVC and more - -#ifdef BOOST_MSVC -#pragma warning(push) -#pragma warning(disable:4127) // conditional expression is constant -#pragma warning(disable:4512) // 'boost::detail::resetter' : assignment operator could not be generated -#pragma warning(disable:4800) // 'unsigned int' : forcing value to bool 'true' or 'false' (performance warning) -#endif - -#include <boost/rational.hpp> - -#ifdef BOOST_MSVC -#pragma warning(pop) -#endif - -#include <boost/icl/type_traits/is_continuous.hpp> -#include <boost/icl/type_traits/has_inverse.hpp> -#include <boost/icl/type_traits/is_numeric.hpp> - -namespace boost{namespace icl -{ - template<class Integral> - struct is_numeric<boost::rational<Integral> > - { - typedef is_numeric type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<class Integral> - struct is_continuous<boost::rational<Integral> > - { - typedef is_continuous type; - BOOST_STATIC_CONSTANT(bool, value = true); - }; - - template<class Integral> - struct is_discrete<boost::rational<Integral> > - { - typedef is_discrete type; - BOOST_STATIC_CONSTANT(bool, value = false); - }; - - template<class Integral> - struct has_inverse<boost::rational<Integral> > - { - typedef has_inverse type; - BOOST_STATIC_CONSTANT(bool, value = (boost::is_signed<Integral>::value)); - }; - -}} // namespace icl boost - - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/separate_interval_set.hpp b/contrib/restricted/boost/boost/icl/separate_interval_set.hpp deleted file mode 100644 index 14bb7f016be..00000000000 --- a/contrib/restricted/boost/boost/icl/separate_interval_set.hpp +++ /dev/null @@ -1,217 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_SEPARATE_INTERVAL_SET_HPP_JOFA_080608 -#define BOOST_ICL_SEPARATE_INTERVAL_SET_HPP_JOFA_080608 - -#include <boost/assert.hpp> -#include <boost/icl/type_traits/is_interval_separator.hpp> -#include <boost/icl/interval_base_set.hpp> -#include <boost/icl/interval_set.hpp> - -namespace boost{namespace icl -{ - -/** \brief Implements a set as a set of intervals - leaving adjoining intervals separate */ -template -< - typename DomainT, - ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT), - ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), - ICL_ALLOC Alloc = std::allocator -> -class separate_interval_set: - public interval_base_set<separate_interval_set<DomainT,Compare,Interval,Alloc>, - DomainT,Compare,Interval,Alloc> -{ -public: - typedef separate_interval_set<DomainT,Compare,Interval,Alloc> type; - - typedef interval_base_set<type,DomainT,Compare,Interval,Alloc> base_type; - - typedef type overloadable_type; - typedef type key_object_type; - - typedef interval_set<DomainT,Compare,Interval,Alloc> joint_type; - - /// The domain type of the set - typedef DomainT domain_type; - /// The codomaintype is the same as domain_type - typedef DomainT codomain_type; - - /// The element type of the set - typedef DomainT element_type; - /// The interval type of the set - typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; - /// The segment type of the set - typedef interval_type segment_type; - - /// Comparison functor for domain values - typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; - /// Comparison functor for intervals - typedef exclusive_less_than<interval_type> interval_compare; - - /// Comparison functor for keys - typedef exclusive_less_than<interval_type> key_compare; - - /// The allocator type of the set - typedef Alloc<interval_type> allocator_type; - - /// allocator type of the corresponding element set - typedef Alloc<DomainT> domain_allocator_type; - - /// The corresponding atomized type representing this interval container of elements - typedef typename base_type::atomized_type atomized_type; - - /// Container type for the implementation - 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::value_type data_type; - /// value type of the implementing container - typedef typename ImplSetT::value_type value_type; - - /// iterator for iteration over intervals - typedef typename ImplSetT::iterator iterator; - /// const_iterator for iteration over intervals - typedef typename ImplSetT::const_iterator const_iterator; - - enum { fineness = 2 }; - -public: - //========================================================================== - //= Construct, copy, destruct - //========================================================================== - /// Default constructor for the empty object - separate_interval_set(): base_type() {} - /// Copy constructor - separate_interval_set(const separate_interval_set& src): base_type(src) {} - - /// Copy constructor for base_type - template<class SubType> - separate_interval_set - (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src) - { - this->assign(src); - } - - /// Constructor for a single element - explicit separate_interval_set(const domain_type& elem): base_type() { this->add(elem); } - /// Constructor for a single interval - explicit separate_interval_set(const interval_type& itv): base_type() { this->add(itv); } - - /// Assignment from a base interval_set. - template<class SubType> - void assign(const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src) - { - this->clear(); - this->_set.insert(src.begin(), src.end()); - } - - /// Assignment operator for base type - template<class SubType> - separate_interval_set& operator = - (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src) - { - this->assign(src); - return *this; - } - -# ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - //========================================================================== - //= Move semantics - //========================================================================== - - /// Move constructor - separate_interval_set(separate_interval_set&& src) - : base_type(boost::move(src)) - {} - - /// Move assignment operator - separate_interval_set& operator = (separate_interval_set src) - { - base_type::operator=(boost::move(src)); - return *this; - } - //========================================================================== -# else - - /// Assignment operator - separate_interval_set& operator = (const separate_interval_set& src) - { - base_type::operator=(src); - return *this; - } - -# endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - -private: - // Private functions that shall be accessible by the baseclass: - friend class - interval_base_set<separate_interval_set<DomainT,Compare,Interval,Alloc>, - DomainT,Compare,Interval,Alloc>; - - iterator handle_inserted(iterator inserted_) - { - return inserted_; - } - - iterator add_over(const interval_type& addend, iterator last_) - { - return segmental::join_under(*this, addend, last_); - } - - iterator add_over(const interval_type& addend) - { - return segmental::join_under(*this, addend); - } - -} ; - - - -//----------------------------------------------------------------------------- -// type traits -//----------------------------------------------------------------------------- -template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_set<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > -{ - typedef is_set<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_interval_container<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > -{ - typedef is_interval_container<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_interval_separator<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > -{ - typedef is_interval_separator<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -//----------------------------------------------------------------------------- -// type representation -//----------------------------------------------------------------------------- -template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct type_to_string<icl::separate_interval_set<DomainT,Compare,Interval,Alloc> > -{ - static std::string apply() - { return "se_itv_set<"+ type_to_string<DomainT>::apply() +">"; } -}; - -}} // namespace icl boost - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/set.hpp b/contrib/restricted/boost/boost/icl/set.hpp deleted file mode 100644 index db44b5e80df..00000000000 --- a/contrib/restricted/boost/boost/icl/set.hpp +++ /dev/null @@ -1,25 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-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_SET_HPP_JOFA_070519 -#define BOOST_ICL_SET_HPP_JOFA_070519 - -#include <boost/icl/impl_config.hpp> - -#if defined(ICL_USE_BOOST_MOVE_IMPLEMENTATION) -# include <boost/container/set.hpp> -#elif defined(ICL_USE_STD_IMPLEMENTATION) -# include <set> -#else -# include <set> -#endif - -#include <boost/icl/associative_element_container.hpp> -#include <boost/icl/functors.hpp> - -#endif // BOOST_ICL_SET_HPP_JOFA_070519 - diff --git a/contrib/restricted/boost/boost/icl/split_interval_map.hpp b/contrib/restricted/boost/boost/icl/split_interval_map.hpp deleted file mode 100644 index aae2e8ae3b4..00000000000 --- a/contrib/restricted/boost/boost/icl/split_interval_map.hpp +++ /dev/null @@ -1,246 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-2012: Joachim Faulhaber -Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin -+------------------------------------------------------------------------------+ - 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_SPLIT_INTERVAL_MAP_HPP_JOFA_000706 -#define BOOST_ICL_SPLIT_INTERVAL_MAP_HPP_JOFA_000706 - -#include <boost/icl/interval_set.hpp> -#include <boost/icl/interval_map.hpp> -#include <boost/icl/interval_base_map.hpp> -#include <boost/icl/split_interval_set.hpp> - -namespace boost{namespace icl -{ - -/** \brief implements a map as a map of intervals - on insertion - overlapping intervals are split and associated values are combined. */ -template -< - typename DomainT, - typename CodomainT, - class Traits = icl::partial_absorber, - ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT), - ICL_COMBINE Combine = ICL_COMBINE_INSTANCE(icl::inplace_plus, CodomainT), - ICL_SECTION Section = ICL_SECTION_INSTANCE(icl::inter_section, CodomainT), - ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), - ICL_ALLOC Alloc = std::allocator -> -class split_interval_map: - public interval_base_map<split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>, - DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> -{ -public: - typedef Traits traits; - typedef split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> type; - typedef interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> joint_type; - typedef type overloadable_type; - - typedef interval_base_map <type, - DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> base_type; - - typedef DomainT domain_type; - typedef CodomainT codomain_type; - typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; - typedef typename base_type::iterator iterator; - typedef typename base_type::value_type value_type; - typedef typename base_type::element_type element_type; - typedef typename base_type::segment_type segment_type; - typedef typename base_type::domain_mapping_type domain_mapping_type; - typedef typename base_type::interval_mapping_type interval_mapping_type; - typedef typename base_type::ImplMapT ImplMapT; - - typedef typename base_type::codomain_combine codomain_combine; - - typedef interval_set<DomainT,Compare,Interval,Alloc> interval_set_type; - typedef interval_set_type set_type; - typedef set_type key_object_type; - - enum { fineness = 3 }; - -public: - //========================================================================== - //= Construct, copy, destruct - //========================================================================== - /// Default constructor for the empty object - split_interval_map(): base_type() {} - - /// Copy constructor - split_interval_map(const split_interval_map& src): base_type(src) {} - - explicit split_interval_map(const domain_mapping_type& base_pair): base_type() - { this->add(base_pair); } - - explicit split_interval_map(const value_type& value_pair): base_type() - { this->add(value_pair); } - - /// Assignment from a base interval_map. - template<class SubType> - void assign(const interval_base_map<SubType,DomainT,CodomainT, - Traits,Compare,Combine,Section,Interval,Alloc>& src) - { - this->clear(); - this->_map.insert(src.begin(), src.end()); - } - - /// Assignment operator for base type - template<class SubType> - split_interval_map& operator = - (const interval_base_map<SubType,DomainT,CodomainT, - Traits,Compare,Combine,Section,Interval,Alloc>& src) - { - this->assign(src); - return *this; - } - -# ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - //========================================================================== - //= Move semantics - //========================================================================== - - /// Move constructor - split_interval_map(split_interval_map&& src) - : base_type(boost::move(src)) - {} - - /// Move assignment operator - split_interval_map& operator = (split_interval_map src) - { - base_type::operator=(boost::move(src)); - return *this; - } - - //========================================================================== -# else - - /// Assignment operator - split_interval_map& operator = (const split_interval_map& src) - { - base_type::operator=(src); - return *this; - } - -# endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - -private: - // Private functions that shall be accessible by the baseclass: - friend class - interval_base_map <split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>, - DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc>; - - iterator handle_inserted(iterator it_)const { return it_; } - void handle_inserted(iterator, iterator)const{ } - - template<class Combiner> - void handle_left_combined(iterator it_) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - this->_map.erase(it_); - } - - template<class Combiner> - void handle_combined(iterator it_) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - this->_map.erase(it_); - } - - template<class Combiner> - void handle_preceeded_combined(iterator prior_, iterator& it_) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - { - this->_map.erase(it_); - it_ = prior_; - } - } - - template<class Combiner> - void handle_succeeded_combined(iterator it_, iterator) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - this->_map.erase(it_); - } - - void handle_reinserted(iterator){} - - template<class Combiner> - void gap_insert_at(iterator& it_, iterator prior_, - const interval_type& end_gap, const codomain_type& co_val) - { - if(on_absorbtion<type,Combiner,Traits::absorbs_identities>::is_absorbable((*it_).second)) - { - this->_map.erase(it_); - it_ = this->template gap_insert<Combiner>(prior_, end_gap, co_val); - } - else - it_ = this->template gap_insert<Combiner>(it_, end_gap, co_val); - } -} ; - -//----------------------------------------------------------------------------- -// type traits -//----------------------------------------------------------------------------- -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_map<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_map<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct has_inverse<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef has_inverse<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (has_inverse<CodomainT>::value)); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_interval_container<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_interval_container<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_interval_splitter<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_interval_splitter<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct absorbs_identities<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef absorbs_identities<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (Traits::absorbs_identities)); -}; - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_total<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - typedef is_total<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = (Traits::is_total)); -}; - - -template <class DomainT, class CodomainT, class Traits, ICL_COMPARE Compare, ICL_COMBINE Combine, ICL_SECTION Section, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct type_to_string<icl::split_interval_map<DomainT,CodomainT,Traits,Compare,Combine,Section,Interval,Alloc> > -{ - static std::string apply() - { - return "sp_itv_map<"+ type_to_string<DomainT>::apply() + "," - + type_to_string<CodomainT>::apply() + "," - + type_to_string<Traits>::apply() +">"; - } -}; - -}} // namespace icl boost - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/split_interval_set.hpp b/contrib/restricted/boost/boost/icl/split_interval_set.hpp deleted file mode 100644 index ca0d0222e75..00000000000 --- a/contrib/restricted/boost/boost/icl/split_interval_set.hpp +++ /dev/null @@ -1,237 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-2009: Joachim Faulhaber -Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin -+------------------------------------------------------------------------------+ - 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_SPLIT_INTERVAL_SET_HPP_JOFA_990223 -#define BOOST_ICL_SPLIT_INTERVAL_SET_HPP_JOFA_990223 - -#include <boost/icl/type_traits/is_interval_splitter.hpp> -#include <boost/icl/interval_base_set.hpp> -#include <boost/icl/interval_set.hpp> - -namespace boost{namespace icl -{ - -/** \brief implements a set as a set of intervals - on insertion - overlapping intervals are split */ -template -< - typename DomainT, - ICL_COMPARE Compare = ICL_COMPARE_INSTANCE(ICL_COMPARE_DEFAULT, DomainT), - ICL_INTERVAL(ICL_COMPARE) Interval = ICL_INTERVAL_INSTANCE(ICL_INTERVAL_DEFAULT, DomainT, Compare), - ICL_ALLOC Alloc = std::allocator -> -class split_interval_set: - public interval_base_set<split_interval_set<DomainT,Compare,Interval,Alloc>, - DomainT,Compare,Interval,Alloc> -{ -public: - typedef split_interval_set<DomainT,Compare,Interval,Alloc> type; - typedef interval_base_set<type,DomainT,Compare,Interval,Alloc> base_type; - - typedef interval_set<DomainT,Compare,Interval,Alloc> joint_type; - typedef type overloadable_type; - typedef type key_object_type; - - /// The domain type of the set - typedef DomainT domain_type; - /// The codomaintype is the same as domain_type - typedef DomainT codomain_type; - - /// The element type of the set - typedef DomainT element_type; - /// The interval type of the set - typedef ICL_INTERVAL_TYPE(Interval,DomainT,Compare) interval_type; - /// The segment type of the set - typedef interval_type segment_type; - - /// Comparison functor for domain values - typedef ICL_COMPARE_DOMAIN(Compare,DomainT) domain_compare; - /// Comparison functor for intervals - typedef exclusive_less_than<interval_type> interval_compare; - - /// Comparison functor for keys - typedef exclusive_less_than<interval_type> key_compare; - - /// The allocator type of the set - typedef Alloc<interval_type> allocator_type; - - /// allocator type of the corresponding element set - typedef Alloc<DomainT> domain_allocator_type; - - /// The corresponding atomized type representing this interval container of elements - typedef typename base_type::atomized_type atomized_type; - - /// Container type for the implementation - 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::value_type data_type; - /// value type of the implementing container - typedef typename ImplSetT::value_type value_type; - - /// iterator for iteration over intervals - typedef typename ImplSetT::iterator iterator; - /// const_iterator for iteration over intervals - typedef typename ImplSetT::const_iterator const_iterator; - - enum { fineness = 3 }; - -public: - //========================================================================== - //= Construct, copy, destruct - //========================================================================== - /// Default constructor for the empty object - split_interval_set(): base_type() {} - - /// Copy constructor - split_interval_set(const split_interval_set& src): base_type(src) {} - - /// Copy constructor for base_type - template<class SubType> - split_interval_set - (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src) - { this->assign(src); } - - /// Constructor for a single element - explicit split_interval_set(const interval_type& elem): base_type() { this->add(elem); } - /// Constructor for a single interval - explicit split_interval_set(const domain_type& itv): base_type() { this->add(itv); } - - /// Assignment from a base interval_set. - template<class SubType> - void assign(const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src) - { - this->clear(); - this->_set.insert(src.begin(), src.end()); - } - - /// Assignment operator for base type - template<class SubType> - split_interval_set& operator = - (const interval_base_set<SubType,DomainT,Compare,Interval,Alloc>& src) - { - this->assign(src); - return *this; - } - -# ifndef BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - //========================================================================== - //= Move semantics - //========================================================================== - - /// Move constructor - split_interval_set(split_interval_set&& src) - : base_type(boost::move(src)) - {} - - /// Move assignment operator - split_interval_set& operator = (split_interval_set src) - { - base_type::operator=(boost::move(src)); - return *this; - } - //========================================================================== -# else - - /// Assignment operator - split_interval_set& operator = (const split_interval_set& src) - { - base_type::operator=(src); - return *this; - } - -# endif // BOOST_ICL_NO_CXX11_RVALUE_REFERENCES - -private: - // Private functions that shall be accessible by the baseclass: - friend class - interval_base_set<split_interval_set<DomainT,Compare,Interval,Alloc>, - DomainT,Compare,Interval,Alloc>; - - iterator handle_inserted(iterator inserted_) - { - return inserted_; - } - - iterator add_over(const interval_type& addend, iterator last_) - { - iterator first_ = this->_set.lower_bound(addend); - //BOOST_ASSERT(next(last_) == this->_set.upper_bound(inter_val)); - - iterator it_ = first_; - interval_type rest_interval = addend; - - this->add_front(rest_interval, it_); - this->add_main (rest_interval, it_, last_); - this->add_rear (rest_interval, it_); - return it_; - } - - iterator add_over(const interval_type& addend) - { - std::pair<iterator,iterator> overlap = this->equal_range(addend); - iterator first_ = overlap.first, - end_ = overlap.second, - last_ = end_; --last_; - - iterator it_ = first_; - interval_type rest_interval = addend; - - this->add_front(rest_interval, it_); - this->add_main (rest_interval, it_, last_); - this->add_rear (rest_interval, it_); - - return it_; - } - -} ; - - -//----------------------------------------------------------------------------- -// type traits -//----------------------------------------------------------------------------- -template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_set<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > -{ - typedef is_set<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_interval_container<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > -{ - typedef is_interval_container<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct is_interval_splitter<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > -{ - typedef is_interval_splitter<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > type; - BOOST_STATIC_CONSTANT(bool, value = true); -}; - -//----------------------------------------------------------------------------- -// type representation -//----------------------------------------------------------------------------- -template <class DomainT, ICL_COMPARE Compare, ICL_INTERVAL(ICL_COMPARE) Interval, ICL_ALLOC Alloc> -struct type_to_string<icl::split_interval_set<DomainT,Compare,Interval,Alloc> > -{ - static std::string apply() - { return "sp_itv_set<"+ type_to_string<DomainT>::apply() +">"; } -}; - - -}} // namespace icl boost - -#endif // BOOST_ICL_SPLIT_INTERVAL_SET_HPP_JOFA_990223 - - - diff --git a/contrib/restricted/boost/boost/icl/type_traits/adds_inversely.hpp b/contrib/restricted/boost/boost/icl/type_traits/adds_inversely.hpp deleted file mode 100644 index 29bfeda97ba..00000000000 --- a/contrib/restricted/boost/boost/icl/type_traits/adds_inversely.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829 -#define BOOST_ICL_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829 - -#include <boost/icl/type_traits/has_inverse.hpp> -#include <boost/icl/functors.hpp> - -namespace boost{ namespace icl -{ - -template<class Type, class Combiner> -struct adds_inversely -{ - typedef adds_inversely type; - BOOST_STATIC_CONSTANT(bool, - value = (mpl::and_<has_inverse<Type>, is_negative<Combiner> >::value)); -}; - -}} // namespace boost icl - -#endif // BOOST_ICL_TYPE_TRAITS_ADDS_INVERSELY_HPP_JOFA_100829 - - diff --git a/contrib/restricted/boost/boost/icl/type_traits/difference.hpp b/contrib/restricted/boost/boost/icl/type_traits/difference.hpp deleted file mode 100644 index ecb95bc62fc..00000000000 --- a/contrib/restricted/boost/boost/icl/type_traits/difference.hpp +++ /dev/null @@ -1,19 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_TYPE_TRAITS_DIFFERENCE_HPP_JOFA_080911 -#define BOOST_ICL_TYPE_TRAITS_DIFFERENCE_HPP_JOFA_080911 - -namespace boost{ namespace icl -{ - template <class Type> struct difference{ typedef Type type; }; - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/type_traits/has_inverse.hpp b/contrib/restricted/boost/boost/icl/type_traits/has_inverse.hpp deleted file mode 100644 index fb7c612b6aa..00000000000 --- a/contrib/restricted/boost/boost/icl/type_traits/has_inverse.hpp +++ /dev/null @@ -1,29 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205 -#define BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205 - -#include <boost/type_traits/is_signed.hpp> -#include <boost/type_traits/is_floating_point.hpp> - -namespace boost{ namespace icl -{ - - template <class Type> struct has_inverse - { - typedef has_inverse<Type> type; - BOOST_STATIC_CONSTANT(bool, - value = ( boost::is_signed<Type>::value - || is_floating_point<Type>::value ) ); - }; - -}} // namespace boost icl - -#endif // BOOST_ICL_TYPE_TRAITS_HAS_INVERSE_HPP_JOFA_090205 - - diff --git a/contrib/restricted/boost/boost/icl/type_traits/has_set_semantics.hpp b/contrib/restricted/boost/boost/icl/type_traits/has_set_semantics.hpp deleted file mode 100644 index 3fdaaa74b53..00000000000 --- a/contrib/restricted/boost/boost/icl/type_traits/has_set_semantics.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_TYPE_TRAITS_HAS_SET_SEMANTICS_HPP_JOFA_100829 -#define BOOST_ICL_TYPE_TRAITS_HAS_SET_SEMANTICS_HPP_JOFA_100829 - -#include <boost/mpl/or.hpp> -#include <boost/mpl/and.hpp> -#include <boost/icl/type_traits/is_set.hpp> -#include <boost/icl/type_traits/is_map.hpp> -#include <boost/icl/type_traits/codomain_type_of.hpp> - -namespace boost{ namespace icl -{ - template <class Type> struct has_set_semantics - { - typedef has_set_semantics<Type> type; - BOOST_STATIC_CONSTANT(bool, - value = (mpl::or_< is_set<Type> - , mpl::and_< is_map<Type> - , has_set_semantics - <typename codomain_type_of<Type>::type > - > - >::value)); - }; - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_associative_element_container.hpp b/contrib/restricted/boost/boost/icl/type_traits/is_associative_element_container.hpp deleted file mode 100644 index 004da9035b8..00000000000 --- a/contrib/restricted/boost/boost/icl/type_traits/is_associative_element_container.hpp +++ /dev/null @@ -1,32 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_TYPE_TRAITS_IS_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_100831 -#define BOOST_ICL_TYPE_TRAITS_IS_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_100831 - -#include <boost/mpl/and.hpp> -#include <boost/mpl/or.hpp> -#include <boost/mpl/not.hpp> -#include <boost/icl/type_traits/is_element_container.hpp> -#include <boost/icl/type_traits/is_set.hpp> - -namespace boost{ namespace icl -{ - template <class Type> - struct is_associative_element_container - { - typedef is_associative_element_container type; - BOOST_STATIC_CONSTANT(bool, value = - (mpl::or_<is_element_set<Type>, is_element_map<Type> >::value)); - }; - - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_key_container_of.hpp b/contrib/restricted/boost/boost/icl/type_traits/is_key_container_of.hpp deleted file mode 100644 index 2dd2c5555dc..00000000000 --- a/contrib/restricted/boost/boost/icl/type_traits/is_key_container_of.hpp +++ /dev/null @@ -1,89 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2010-2010: 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_TYPE_TRAITS_IS_KEY_CONTAINER_OF_HPP_JOFA_100829 -#define BOOST_ICL_TYPE_TRAITS_IS_KEY_CONTAINER_OF_HPP_JOFA_100829 - -#include <boost/mpl/has_xxx.hpp> -#include <boost/icl/type_traits/is_combinable.hpp> -#include <boost/icl/type_traits/is_container.hpp> - -namespace boost{ namespace icl -{ - //-------------------------------------------------------------------------- - namespace detail - { - BOOST_MPL_HAS_XXX_TRAIT_DEF(key_object_type) - } - - //-------------------------------------------------------------------------- - template <class Type> - struct has_key_object_type - : mpl::bool_<detail::has_key_object_type<Type>::value> - {}; - - template <class Type, bool HasKeyContainerType, bool IsSet> - struct get_key_object_type; - - template <class Type> - struct get_key_object_type<Type, false, false> - { - typedef Type no_type; - }; - - template <class Type> - struct get_key_object_type<Type, false, true> - { - typedef Type type; - }; - - template <class Type, bool IsSet> - struct get_key_object_type<Type, true, IsSet> - { - typedef typename Type::key_object_type type; - }; - - template <class Type> - struct key_container_type_of - { - typedef typename - get_key_object_type - < Type - , has_key_object_type<Type>::value - , mpl::or_<is_set<Type>, is_map<Type> >::value - >::type type; - }; - - //-------------------------------------------------------------------------- - template<class KeyT, class ObjectT> - struct is_strict_key_container_of // set is_strict_key_container_of map - { - typedef is_strict_key_container_of<KeyT, ObjectT> type; - BOOST_STATIC_CONSTANT(bool, value = - (mpl::and_< is_map<ObjectT> - , boost::is_same<KeyT, typename key_container_type_of<ObjectT>::type> >::value) - ); - }; - - template<class KeyT, class ObjectT> - struct is_key_container_of // set is_key_container_of (set or map) - { - typedef is_key_container_of<KeyT, ObjectT> type; - BOOST_STATIC_CONSTANT(bool, value = - (mpl::or_< is_strict_key_container_of<KeyT, ObjectT> - , mpl::and_< mpl::or_<is_set<ObjectT>, is_map<ObjectT> > - , boost::is_same<ObjectT, KeyT> > >::value) - ); - }; - - - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/type_traits/size.hpp b/contrib/restricted/boost/boost/icl/type_traits/size.hpp deleted file mode 100644 index 4fdc781745b..00000000000 --- a/contrib/restricted/boost/boost/icl/type_traits/size.hpp +++ /dev/null @@ -1,18 +0,0 @@ -/*-----------------------------------------------------------------------------+ -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) -+-----------------------------------------------------------------------------*/ -#ifndef BOOST_ICL_TYPE_TRAITS_SIZE_HPP_JOFA_080911 -#define BOOST_ICL_TYPE_TRAITS_SIZE_HPP_JOFA_080911 - -namespace boost{ namespace icl -{ - template <class Type> struct size{ typedef std::size_t type; }; -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/boost/icl/type_traits/to_string.hpp b/contrib/restricted/boost/boost/icl/type_traits/to_string.hpp deleted file mode 100644 index 4548c56deed..00000000000 --- a/contrib/restricted/boost/boost/icl/type_traits/to_string.hpp +++ /dev/null @@ -1,43 +0,0 @@ -/*-----------------------------------------------------------------------------+ -Copyright (c) 2007-2009: Joachim Faulhaber -+------------------------------------------------------------------------------+ -Copyright (c) 1999-2006: Cortex Software GmbH, Kantstrasse 57, Berlin -+------------------------------------------------------------------------------+ - 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) -+-----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------- -Function-templates for discrete Datatypes like int, unsigned or - any class that provides a ++ operator c.f. iterators ------------------------------------------------------------------------------*/ - -#ifndef BOOST_ICL_TO_STRING_HPP_JOFA_000712 -#define BOOST_ICL_TO_STRING_HPP_JOFA_000712 - -#include <stdio.h> -#include <string> -#include <sstream> - -namespace boost{ namespace icl -{ - -/// Static class template for the string representation of values -template <class Type> -struct to_string -{ - /** Converts all values of types to std::string that implement an operator << */ - static std::string apply(const Type& value) - { - std::stringstream repr; - repr << value; - return repr.str(); - } -}; - -}} // namespace boost icl - -#endif - - diff --git a/contrib/restricted/boost/icl/CMakeLists.txt b/contrib/restricted/boost/icl/CMakeLists.txt new file mode 100644 index 00000000000..a6b91c86b2d --- /dev/null +++ b/contrib/restricted/boost/icl/CMakeLists.txt @@ -0,0 +1,31 @@ + +# This file was gererated by the build system used internally in the Yandex monorepo. +# Only simple modifications are allowed (adding source-files to targets, adding simple properties +# like target_include_directories). These modifications will be ported to original +# ya.make files by maintainers. Any complex modifications which can't be ported back to the +# original buildsystem will not be accepted. + + + +add_library(restricted-boost-icl INTERFACE) +target_include_directories(restricted-boost-icl INTERFACE + ${CMAKE_SOURCE_DIR}/contrib/restricted/boost/icl/include +) +target_link_libraries(restricted-boost-icl INTERFACE + contrib-libs-cxxsupp + yutil + restricted-boost-assert + restricted-boost-concept_check + restricted-boost-config + restricted-boost-container + restricted-boost-core + restricted-boost-date_time + restricted-boost-detail + restricted-boost-iterator + restricted-boost-move + restricted-boost-mpl + restricted-boost-rational + restricted-boost-static_assert + restricted-boost-type_traits + restricted-boost-utility +) diff --git a/contrib/restricted/boost/boost/icl/associative_interval_container.hpp b/contrib/restricted/boost/icl/include/boost/icl/associative_interval_container.hpp index f59717fcd4c..f59717fcd4c 100644 --- a/contrib/restricted/boost/boost/icl/associative_interval_container.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/associative_interval_container.hpp diff --git a/contrib/restricted/boost/boost/icl/closed_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/closed_interval.hpp index a0278e8250a..a0278e8250a 100644 --- a/contrib/restricted/boost/boost/icl/closed_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/closed_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/comparable.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/comparable.hpp index a4a70752a3f..a4a70752a3f 100644 --- a/contrib/restricted/boost/boost/icl/concept/comparable.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/comparable.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/container.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/container.hpp index f5bf0a389cd..f5bf0a389cd 100644 --- a/contrib/restricted/boost/boost/icl/concept/container.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/container.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/interval.hpp index 10fa2fb8a76..10fa2fb8a76 100644 --- a/contrib/restricted/boost/boost/icl/concept/interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/interval.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/interval_associator.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_associator.hpp index 5ffbe6256b5..5ffbe6256b5 100644 --- a/contrib/restricted/boost/boost/icl/concept/interval_associator.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_associator.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/interval_associator_base.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_associator_base.hpp index f8b56e95cf3..f8b56e95cf3 100644 --- a/contrib/restricted/boost/boost/icl/concept/interval_associator_base.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_associator_base.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/interval_bounds.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_bounds.hpp index 886701d57a2..886701d57a2 100644 --- a/contrib/restricted/boost/boost/icl/concept/interval_bounds.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_bounds.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/interval_map.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_map.hpp index 58298d80422..58298d80422 100644 --- a/contrib/restricted/boost/boost/icl/concept/interval_map.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_map.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/interval_set.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_set.hpp index 63aad410639..63aad410639 100644 --- a/contrib/restricted/boost/boost/icl/concept/interval_set.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_set.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/interval_set_value.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_set_value.hpp index 027616e961e..027616e961e 100644 --- a/contrib/restricted/boost/boost/icl/concept/interval_set_value.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/interval_set_value.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/joinable.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/joinable.hpp index b173aca90d9..b173aca90d9 100644 --- a/contrib/restricted/boost/boost/icl/concept/joinable.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/joinable.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/map_value.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/map_value.hpp index d5cc2de4e43..d5cc2de4e43 100644 --- a/contrib/restricted/boost/boost/icl/concept/map_value.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/map_value.hpp diff --git a/contrib/restricted/boost/boost/icl/concept/set_value.hpp b/contrib/restricted/boost/icl/include/boost/icl/concept/set_value.hpp index 8b87318fefb..8b87318fefb 100644 --- a/contrib/restricted/boost/boost/icl/concept/set_value.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/concept/set_value.hpp diff --git a/contrib/restricted/boost/boost/icl/continuous_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/continuous_interval.hpp index 3015a1d13d3..3015a1d13d3 100644 --- a/contrib/restricted/boost/boost/icl/continuous_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/continuous_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/associated_value.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/associated_value.hpp index 895c7f9a38a..895c7f9a38a 100644 --- a/contrib/restricted/boost/boost/icl/detail/associated_value.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/associated_value.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/boost_config.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/boost_config.hpp index b8354e6abf0..b8354e6abf0 100644 --- a/contrib/restricted/boost/boost/icl/detail/boost_config.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/boost_config.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/concept_check.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/concept_check.hpp index 5a37f5f25c0..5a37f5f25c0 100644 --- a/contrib/restricted/boost/boost/icl/detail/concept_check.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/concept_check.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/design_config.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/design_config.hpp index 26240715ba5..26240715ba5 100644 --- a/contrib/restricted/boost/boost/icl/detail/design_config.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/design_config.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/element_comparer.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/element_comparer.hpp index 56ae8c532a4..56ae8c532a4 100644 --- a/contrib/restricted/boost/boost/icl/detail/element_comparer.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/element_comparer.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/element_iterator.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/element_iterator.hpp index d01cea3b514..d01cea3b514 100644 --- a/contrib/restricted/boost/boost/icl/detail/element_iterator.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/element_iterator.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/exclusive_less_than.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/exclusive_less_than.hpp index 3a4aa6505a4..3a4aa6505a4 100644 --- a/contrib/restricted/boost/boost/icl/detail/exclusive_less_than.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/exclusive_less_than.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/interval_map_algo.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/interval_map_algo.hpp index 7d2432d0fbe..7d2432d0fbe 100644 --- a/contrib/restricted/boost/boost/icl/detail/interval_map_algo.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/interval_map_algo.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/interval_set_algo.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/interval_set_algo.hpp index 1b8216a0a70..1b8216a0a70 100644 --- a/contrib/restricted/boost/boost/icl/detail/interval_set_algo.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/interval_set_algo.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/interval_subset_comparer.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/interval_subset_comparer.hpp index 00ff116c288..00ff116c288 100644 --- a/contrib/restricted/boost/boost/icl/detail/interval_subset_comparer.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/interval_subset_comparer.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/map_algo.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/map_algo.hpp index 89843a2a942..89843a2a942 100644 --- a/contrib/restricted/boost/boost/icl/detail/map_algo.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/map_algo.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/mapped_reference.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/mapped_reference.hpp index 67f7d041376..67f7d041376 100644 --- a/contrib/restricted/boost/boost/icl/detail/mapped_reference.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/mapped_reference.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/notate.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/notate.hpp index d06b6a3f2dd..d06b6a3f2dd 100644 --- a/contrib/restricted/boost/boost/icl/detail/notate.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/notate.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/relation_state.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/relation_state.hpp index f0a0e042865..f0a0e042865 100644 --- a/contrib/restricted/boost/boost/icl/detail/relation_state.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/relation_state.hpp diff --git a/contrib/restricted/boost/boost/icl/detail/set_algo.hpp b/contrib/restricted/boost/icl/include/boost/icl/detail/set_algo.hpp index 7b0e7c59843..7b0e7c59843 100644 --- a/contrib/restricted/boost/boost/icl/detail/set_algo.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/detail/set_algo.hpp diff --git a/contrib/restricted/boost/boost/icl/discrete_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/discrete_interval.hpp index c7e7bbc1fa0..c7e7bbc1fa0 100644 --- a/contrib/restricted/boost/boost/icl/discrete_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/discrete_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/dynamic_interval_traits.hpp b/contrib/restricted/boost/icl/include/boost/icl/dynamic_interval_traits.hpp index 52be023dfae..52be023dfae 100644 --- a/contrib/restricted/boost/boost/icl/dynamic_interval_traits.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/dynamic_interval_traits.hpp diff --git a/contrib/restricted/boost/boost/icl/impl_config.hpp b/contrib/restricted/boost/icl/include/boost/icl/impl_config.hpp index 02782a5b40f..02782a5b40f 100644 --- a/contrib/restricted/boost/boost/icl/impl_config.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/impl_config.hpp diff --git a/contrib/restricted/boost/boost/icl/interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/interval.hpp index df50dfdb278..df50dfdb278 100644 --- a/contrib/restricted/boost/boost/icl/interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/interval.hpp diff --git a/contrib/restricted/boost/boost/icl/interval_base_set.hpp b/contrib/restricted/boost/icl/include/boost/icl/interval_base_set.hpp index b8e148d7059..b6277e23ba9 100644 --- a/contrib/restricted/boost/boost/icl/interval_base_set.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/interval_base_set.hpp @@ -437,7 +437,7 @@ inline void interval_base_set<SubType,DomainT,Compare,Interval,Alloc> if(!icl::is_empty(lead_gap)) // [lead_gap--- . . . // [prior_) [-- it_ ... - this->_set.insert(it_, lead_gap); + this->_set.insert(cyclic_prior(*this, it_), lead_gap); // . . . --------- . . . addend interval // [-- it_ --) has a common part with the first overval diff --git a/contrib/restricted/boost/boost/icl/interval_bounds.hpp b/contrib/restricted/boost/icl/include/boost/icl/interval_bounds.hpp index f917cb6f560..f917cb6f560 100644 --- a/contrib/restricted/boost/boost/icl/interval_bounds.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/interval_bounds.hpp diff --git a/contrib/restricted/boost/boost/icl/interval_combining_style.hpp b/contrib/restricted/boost/icl/include/boost/icl/interval_combining_style.hpp index aa5444c800e..aa5444c800e 100644 --- a/contrib/restricted/boost/boost/icl/interval_combining_style.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/interval_combining_style.hpp diff --git a/contrib/restricted/boost/boost/icl/interval_set.hpp b/contrib/restricted/boost/icl/include/boost/icl/interval_set.hpp index 22f97a4c275..22f97a4c275 100644 --- a/contrib/restricted/boost/boost/icl/interval_set.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/interval_set.hpp diff --git a/contrib/restricted/boost/boost/icl/interval_traits.hpp b/contrib/restricted/boost/icl/include/boost/icl/interval_traits.hpp index 6335d40cf03..6335d40cf03 100644 --- a/contrib/restricted/boost/boost/icl/interval_traits.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/interval_traits.hpp diff --git a/contrib/restricted/boost/boost/icl/iterator.hpp b/contrib/restricted/boost/icl/include/boost/icl/iterator.hpp index 240e8f88e46..240e8f88e46 100644 --- a/contrib/restricted/boost/boost/icl/iterator.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/iterator.hpp diff --git a/contrib/restricted/boost/boost/icl/left_open_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/left_open_interval.hpp index 817d3dcca05..817d3dcca05 100644 --- a/contrib/restricted/boost/boost/icl/left_open_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/left_open_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/open_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/open_interval.hpp index 95e464ce2c7..95e464ce2c7 100644 --- a/contrib/restricted/boost/boost/icl/open_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/open_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/right_open_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/right_open_interval.hpp index 96cde2cc1fe..96cde2cc1fe 100644 --- a/contrib/restricted/boost/boost/icl/right_open_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/right_open_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/absorbs_identities.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/absorbs_identities.hpp index d1f6246e46b..d1f6246e46b 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/absorbs_identities.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/absorbs_identities.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/codomain_type_of.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/codomain_type_of.hpp index 885479429e8..885479429e8 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/codomain_type_of.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/codomain_type_of.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/difference_type_of.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/difference_type_of.hpp index ec1b58700a1..ec1b58700a1 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/difference_type_of.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/difference_type_of.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/domain_type_of.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/domain_type_of.hpp index cb2fa27146d..cb2fa27146d 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/domain_type_of.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/domain_type_of.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/element_type_of.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/element_type_of.hpp index 5555bcec6e8..5555bcec6e8 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/element_type_of.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/element_type_of.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/identity_element.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/identity_element.hpp index f0cc2ae5806..f0cc2ae5806 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/identity_element.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/identity_element.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/infinity.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/infinity.hpp index 25ccb93a711..25ccb93a711 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/infinity.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/infinity.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/interval_type_default.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/interval_type_default.hpp index 63a31aab651..63a31aab651 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/interval_type_default.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/interval_type_default.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/interval_type_of.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/interval_type_of.hpp index 3e46fe7641c..3e46fe7641c 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/interval_type_of.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/interval_type_of.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_asymmetric_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_asymmetric_interval.hpp index bda6b8b3895..bda6b8b3895 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_asymmetric_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_asymmetric_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_combinable.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_combinable.hpp index 44d23c8d97c..44d23c8d97c 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_combinable.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_combinable.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_concept_equivalent.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_concept_equivalent.hpp index 0cf61a7b705..0cf61a7b705 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_concept_equivalent.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_concept_equivalent.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_container.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_container.hpp index a75e91d3b2b..a75e91d3b2b 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_container.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_container.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_continuous.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_continuous.hpp index 4341326aa8e..4341326aa8e 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_continuous.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_continuous.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_continuous_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_continuous_interval.hpp index 9bb76b836a3..9bb76b836a3 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_continuous_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_continuous_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_discrete.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_discrete.hpp index 380bb19b7db..380bb19b7db 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_discrete.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_discrete.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_discrete_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_discrete_interval.hpp index 38c2ee9f26e..38c2ee9f26e 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_discrete_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_discrete_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_element_container.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_element_container.hpp index 6ffbe9cf070..6ffbe9cf070 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_element_container.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_element_container.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_icl_container.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_icl_container.hpp index 1d66cde3d52..1d66cde3d52 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_icl_container.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_icl_container.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_increasing.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_increasing.hpp index 18c37d73d17..18c37d73d17 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_increasing.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_increasing.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_interval.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval.hpp index 682c617be94..682c617be94 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_interval.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_interval_container.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval_container.hpp index e612d63f603..e612d63f603 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_interval_container.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval_container.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_interval_joiner.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval_joiner.hpp index 747edbc23ab..747edbc23ab 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_interval_joiner.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval_joiner.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_interval_separator.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval_separator.hpp index dd498269f70..dd498269f70 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_interval_separator.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval_separator.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_interval_splitter.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval_splitter.hpp index 77528ab0930..77528ab0930 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_interval_splitter.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_interval_splitter.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_map.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_map.hpp index 49fe0f9e354..49fe0f9e354 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_map.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_map.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_numeric.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_numeric.hpp index 9ecc3a16b87..9ecc3a16b87 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_numeric.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_numeric.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_set.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_set.hpp index 7347929a019..7347929a019 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_set.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_set.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/is_total.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_total.hpp index bc9b2d61905..bc9b2d61905 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/is_total.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/is_total.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/no_type.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/no_type.hpp index 73e464f28b0..73e464f28b0 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/no_type.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/no_type.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/predicate.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/predicate.hpp index 7d7de3742fb..7d7de3742fb 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/predicate.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/predicate.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/rep_type_of.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/rep_type_of.hpp index 4cdc6cc4cba..4cdc6cc4cba 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/rep_type_of.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/rep_type_of.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/segment_type_of.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/segment_type_of.hpp index 21438ae38ae..21438ae38ae 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/segment_type_of.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/segment_type_of.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/size_type_of.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/size_type_of.hpp index 028206faa9c..028206faa9c 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/size_type_of.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/size_type_of.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/succ_pred.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/succ_pred.hpp index ce82e14fdd3..ce82e14fdd3 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/succ_pred.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/succ_pred.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/type_to_string.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/type_to_string.hpp index 994711b4641..994711b4641 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/type_to_string.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/type_to_string.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/unit_element.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/unit_element.hpp index da9fa7806e0..da9fa7806e0 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/unit_element.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/unit_element.hpp diff --git a/contrib/restricted/boost/boost/icl/type_traits/value_size.hpp b/contrib/restricted/boost/icl/include/boost/icl/type_traits/value_size.hpp index 4a37f112615..4a37f112615 100644 --- a/contrib/restricted/boost/boost/icl/type_traits/value_size.hpp +++ b/contrib/restricted/boost/icl/include/boost/icl/type_traits/value_size.hpp diff --git a/library/cpp/neh/http2.cpp b/library/cpp/neh/http2.cpp index 0bba29cf229..83e8db09806 100644 --- a/library/cpp/neh/http2.cpp +++ b/library/cpp/neh/http2.cpp @@ -183,7 +183,7 @@ namespace { } bool Compress(TData& data, const TString& compressionScheme) { - if (compressionScheme == "gzip") { + if (compressionScheme == "gzip" && data.size() > 23) { // there is no string less than 24 bytes long that might be compressed with gzip try { TData gzipped(data.size()); TMemoryOutput out(gzipped.data(), gzipped.size()); |