|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65553 - in sandbox/itl/boost/itl: . concept/interval detail
From: afojgo_at_[hidden]
Date: 2010-09-23 12:26:08
Author: jofaber
Date: 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
New Revision: 65553
URL: http://svn.boost.org/trac/boost/changeset/65553
Log:
Refactoring: Removed obsolete files. Stable{msvc-9.0, gcc-3.4.4}
Removed:
sandbox/itl/boost/itl/detail/interval_map_functors.hpp
sandbox/itl/boost/itl/detail/map_functors.hpp
sandbox/itl/boost/itl/functions.hpp
sandbox/itl/boost/itl/map_functions.hpp
sandbox/itl/boost/itl/set_functions.hpp
Text files modified:
sandbox/itl/boost/itl/concept/interval/map.hpp | 1 +
sandbox/itl/boost/itl/concept/interval/set_or_map.hpp | 2 ++
sandbox/itl/boost/itl/interval_set.hpp | 7 ++++++-
3 files changed, 9 insertions(+), 1 deletions(-)
Modified: sandbox/itl/boost/itl/concept/interval/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/concept/interval/map.hpp (original)
+++ sandbox/itl/boost/itl/concept/interval/map.hpp 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
@@ -12,6 +12,7 @@
#include <boost/itl/type_traits/segment_type_of.hpp>
#include <boost/itl/type_traits/absorbs_neutrons.hpp>
#include <boost/itl/type_traits/is_combinable.hpp>
+#include <boost/itl/detail/interval_map_algo.hpp>
namespace boost{ namespace itl
{
Modified: sandbox/itl/boost/itl/concept/interval/set_or_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/concept/interval/set_or_map.hpp (original)
+++ sandbox/itl/boost/itl/concept/interval/set_or_map.hpp 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
@@ -8,6 +8,8 @@
#ifndef BOOST_ITL_CONCEPT_INTERVAL_SET_OR_MAP_HPP_JOFA_100920
#define BOOST_ITL_CONCEPT_INTERVAL_SET_OR_MAP_HPP_JOFA_100920
+#include <boost/itl/type_traits/domain_type_of.hpp>
+#include <boost/itl/type_traits/interval_type_of.hpp>
#include <boost/itl/type_traits/is_combinable.hpp>
namespace boost{ namespace itl
Deleted: sandbox/itl/boost/itl/detail/interval_map_functors.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/interval_map_functors.hpp 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,143 +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_ITL_DETAIL_INTERVAL_MAP_FUNCTORS_HPP_JOFA_100826
-#define BOOST_ITL_DETAIL_INTERVAL_MAP_FUNCTORS_HPP_JOFA_100826
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/functors.hpp>
-#include <boost/itl/interval_functions.hpp>
-#include <boost/itl/detail/interval_map_algo.hpp>
-
-namespace boost{namespace itl
-{
-
-//==============================================================================
-//=P Containment
-//==============================================================================
-
-/*CL
-template<class MapT>
-struct interval_map_contains
-{
- typedef typename MapT::element_type element_type;
- typedef typename MapT::segment_type segment_type;
- typedef typename MapT::interval_type interval_type;
- typedef typename MapT::const_iterator const_iterator;
-
- static bool apply(const MapT& super, const element_type& key_value_pair)
- {
- const_iterator it_ = super.find(key_value_pair.key);
- return it_ != super.end() && it_->second == key_value_pair.data;
- }
-
- static bool apply(const MapT& super, const segment_type& sub_segment)
- {
- interval_type sub_interval = sub_segment.first;
- if(itl::is_empty(sub_interval))
- return true;
-
- std::pair<const_iterator, const_iterator> exterior = super.equal_range(sub_interval);
- if(exterior.first == exterior.second)
- return false;
-
- const_iterator last_overlap = prior(exterior.second);
-
- if(!(sub_segment.second == exterior.first->second) )
- return false;
-
- return
- itl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
- && Interval_Map::is_joinable(super, exterior.first, last_overlap);
- }
-
- template<class CoMapT>
- static typename enable_if<is_interval_map<CoMapT>, bool>::type
- apply(const MapT& super, const CoMapT& sub)
- {
- return Interval_Set::within(sub, super);
- }
-};
-
-//------------------------------------------------------------------------------
-
-template<class MapT, bool is_total>
-struct interval_map_contains_key
-{
- typedef typename MapT::domain_type domain_type;
- typedef typename MapT::interval_type interval_type;
- typedef typename MapT::const_iterator const_iterator;
-
- static bool apply(const MapT&, const domain_type&);
- static bool apply(const MapT&, const interval_type&);
-
- template<class SetT>
- static typename enable_if<is_interval_set<SetT>, bool>::type
- apply(const MapT&, const SetT&);
-};
-
-template<class MapT>
-struct interval_map_contains_key<MapT, true>
-{ // is_total
- typedef typename MapT::domain_type domain_type;
- typedef typename MapT::interval_type interval_type;
- typedef typename MapT::set_type set_type;
-
- //JODO enable_if< is_key_type_of >
- // Key objects are always contained in a total map
- static bool apply(const MapT&, const domain_type& ){ return true; }
- static bool apply(const MapT&, const interval_type&){ return true; }
-
- template<class SetT>
- static typename enable_if<is_interval_set<SetT>, bool>::type
- apply(const MapT&, const SetT&){ return true; }
-};
-
-template<class MapT>
-struct interval_map_contains_key<MapT, false>
-{ // !is_total
- typedef typename MapT::domain_type domain_type;
- typedef typename MapT::interval_type interval_type;
- typedef typename MapT::set_type set_type;
-
- typedef typename MapT::const_iterator const_iterator;
-
- static bool apply(const MapT& super, const domain_type& key)
- {
- return super.find(key) != super.end();
- }
-
- static bool apply(const MapT& super, const interval_type& sub_interval)
- {
- if(itl::is_empty(sub_interval))
- return true;
-
- std::pair<const_iterator, const_iterator> exterior = super.equal_range(sub_interval);
- if(exterior.first == exterior.second)
- return false;
-
- const_iterator last_overlap = prior(exterior.second);
-
- return
- itl::contains(hull(exterior.first->first, last_overlap->first), sub_interval)
- && Interval_Set::is_joinable(super, exterior.first, last_overlap);
- }
-
- template<class SetT>
- static typename enable_if<is_interval_set<SetT>, bool>::type
- apply(const MapT& super, const SetT& sub)
- {
- return Interval_Set::within(sub, super);
- }
-};
-CL delete whole file
-*/
-
-}} // namespace itl boost
-
-#endif
-
Deleted: sandbox/itl/boost/itl/detail/map_functors.hpp
==============================================================================
--- sandbox/itl/boost/itl/detail/map_functors.hpp 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,694 +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_ITL_DETAIL_MAP_FUNCTORS_HPP_JOFA_100823
-#define BOOST_ITL_DETAIL_MAP_FUNCTORS_HPP_JOFA_100823
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/detail/associated_value.hpp>
-#include <boost/itl/type_traits/is_container.hpp>
-#include <boost/itl/type_traits/adds_inversely.hpp>
-#include <boost/itl/type_traits/absorbs_neutrons.hpp>
-#include <boost/itl/functors.hpp>
-
-namespace boost{namespace itl
-{
-
-//------------------------------------------------------------------------------
-//JODO The forward declarations are needed by gcc-3.4.4 here
-template<class Type>
-typename enable_if<is_container<Type>, void>::type
-clear(Type&);
-
-template <class MapT>
-typename enable_if<is_element_map<MapT>, MapT>::type&
-add(MapT&, const typename MapT::value_type&);
-
-//CL template<class MapT>
-//typename enable_if<is_element_map<MapT>,
-// std::pair<typename MapT::iterator,bool> >::type
-//insert(MapT&, const typename MapT::element_type&);
-
-template<class MapT, class Predicate>
-typename enable_if<is_element_map<MapT>, MapT>::type&
-erase_if(const Predicate&, MapT&);
-//------------------------------------------------------------------------------
-
-template<class MapT, class Combiner, bool creates_inverse>
-struct element_version
-{
- static typename MapT::value_type apply(const typename MapT::value_type& val);
-};
-
-template<class MapT, class Combiner>
-struct element_version<MapT, Combiner, false>
-{
- static typename MapT::value_type apply(const typename MapT::value_type& value_pair)
- { return value_pair; }
-};
-
-template<class MapT, class Combiner>
-struct element_version<MapT, Combiner, true>
-{
- static typename MapT::value_type apply(const typename MapT::value_type& value_pair)
- {
- return typename MapT::value_type(value_pair.first, version<Combiner>()(value_pair.second));
- }
-};
-
-//==============================================================================
-//JODO should be made usable for interval maps too and must go to it's own file
-// in itl/detail
-
-template<class MapT, class Combiner, bool absorbs_neutrons>
-struct absorbs_neutron
-{
- static bool apply(const typename MapT::codomain_type& value);
-};
-
-template<class MapT, class Combiner>
-struct absorbs_neutron<MapT,Combiner,false>
-{
- static bool apply(const typename MapT::codomain_type&){ return false; }
-};
-
-template<class MapT, class Combiner>
-struct absorbs_neutron<MapT,Combiner,true>
-{
- static bool apply(const typename MapT::codomain_type& value)
- { return value == Combiner::neutron(); }
-};
-
-//------------------------------------------------------------------------------
-template<class MapT, class Combiner, bool absorbs_neutrons>
-struct handle_neutron
-{
- typedef typename MapT::iterator iterator;
- static iterator apply(MapT& object, iterator it);
-};
-
-template<class MapT, class Combiner>
-struct handle_neutron<MapT,Combiner,false>
-{
- typedef typename MapT::iterator iterator;
- static iterator apply(MapT&, iterator it)
- { return it; }
-};
-
-template<class MapT, class Combiner>
-struct handle_neutron<MapT,Combiner,true>
-{
- typedef typename MapT::iterator iterator;
- static iterator apply(MapT& object, iterator it)
- {
- if(it->second == Combiner::neutron())
- {
- object.erase(it);
- return object.end();
- }
- return it;
- }
-};
-
-//==============================================================================
-
-
-//==============================================================================
-//=P Addition
-//==============================================================================
-
-template <class MapT, class Combiner, bool absorbs_neutrons>
-struct map_add
-{
- typedef MapT map_type;
- typedef typename map_type::value_type value_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::codomain_type codomain_type;
- typedef typename map_type::iterator iterator;
-
- BOOST_STATIC_CONSTANT(bool,
- co_version = (adds_inversely<codomain_type,Combiner>::value));
-
- static map_type& apply(map_type& object, const value_type& value_pair)
- {
- if(absorbs_neutron<MapT,Combiner,absorbs_neutrons>::apply(value_pair.second))
- return object;
-
- // if Combiner is negative e.g. subtract and the codomain has an inverse,
- // we have to insert the inverse element of value_pair.second
- std::pair<iterator, bool> insertion =
- object.insert(element_version<MapT,Combiner,co_version>::apply(value_pair));
-
- if( insertion.second )
- return object;
- else
- {
- iterator it = insertion.first;
- Combiner()((*it).second, value_pair.second);
-
- handle_neutron<MapT,Combiner,absorbs_neutrons>::apply(object, it);
- return object;
- }
- }
-
- static iterator apply(map_type& object, iterator prior, const element_type& value_pair)
- {
- if(absorbs_neutron<MapT,Combiner,absorbs_neutrons>::apply(value_pair.second))
- return object.end();
-
- iterator inserted_
- = object.insert(prior, value_type(value_pair.first, Combiner::neutron()));
- Combiner()(inserted_->second, value_pair.second); // May generate an inverse via inv(x)= 0-x
-
- return handle_neutron<MapT,Combiner,absorbs_neutrons>::apply(object, inserted_);
- }
-};
-
-
-
-//==============================================================================
-//=P Subtraction < is_total && is_invertible >
-//==============================================================================
-
-template<class MapT, bool is_total_invertible>
-struct map_subtract
-{
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
-
- static map_type& apply(map_type&, const element_type& value_pair);
-};
-
-template<class MapT>
-struct map_subtract<MapT, true>
-{
- typedef MapT map_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::inverse_codomain_combine inverse_codomain_combine;
-
- static map_type& apply(map_type& object, const element_type& value_pair)
- {
- cout << "1";
- return map_add<map_type
- ,inverse_codomain_combine
- ,absorbs_neutrons<MapT>::value
- >::apply(object, value_pair);
- }
-};
-
-template<class MapT>
-struct map_subtract<MapT, false>
-{
- typedef MapT map_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::codomain_combine codomain_combine;
- typedef typename map_type::inverse_codomain_combine
- inverse_codomain_combine;
- typedef typename map_type::iterator iterator;
- BOOST_STATIC_CONSTANT(bool, absorbs = (absorbs_neutrons<MapT>::value));
-
- static map_type& apply(map_type& object, const element_type& value_pair)
- {
- cout << "2";
- iterator it_ = object.find(value_pair.first);
- if(it_ != object.end())
- {
- inverse_codomain_combine()((*it_).second, value_pair.second);
- handle_neutron<MapT,codomain_combine,absorbs>::apply(object,it_);
- }
- return object;
- }
-};
-
-
-//==============================================================================
-//=P Insertion
-//==============================================================================
-
-template<class MapT, class Combiner, bool absorbs_neutrons>
-struct map_insert
-{
- typedef MapT map_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::codomain_combine codomain_combine;
- typedef typename map_type::iterator iterator;
-
- static std::pair<iterator,bool> apply(map_type& object, const element_type& value_pair)
- {
- if(absorbs_neutron<MapT,Combiner,absorbs_neutrons>::apply(value_pair.second))
- return std::pair<iterator,bool>(object.end(),true);
- else
- return object.insert(value_pair);
- }
-
- static iterator apply(map_type& object, iterator prior, const element_type& value_pair)
- {
- if(absorbs_neutron<MapT,Combiner,absorbs_neutrons>::apply(value_pair.second))
- return object.end();
- else
- return object.insert(prior, value_pair);
- }
-
-};
-
-//==============================================================================
-//=P Erasure
-//==============================================================================
-
-template<class MapT, class Combiner, bool absorbs_neutrons>
-struct map_erase
-{
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::size_type size_type;
- typedef typename map_type::iterator iterator;
-
- static size_type apply(map_type& object, const domain_type& key)
- {
- iterator it_ = object.find(key);
- if(it_ != object.end())
- {
- object.erase(it_);
- return 1;
- }
-
- return 0;
- }
-
- static size_type apply(map_type& object, const element_type& value_pair)
- {
- if(absorbs_neutron<MapT,Combiner,absorbs_neutrons>::apply(value_pair.second))
- return 0; // neutrons are never contained 'substantially' only 'virtually'.
-
- iterator it_ = object.find(value_pair.first);
- if(it_ != object.end() && value_pair.second == it_->second)
- {
- object.erase(it_);
- return 1;
- }
-
- return 0;
- }
-};
-
-//==============================================================================
-//=P Intersection
-//==============================================================================
-
-template<class MapT, bool is_total>
-struct map_add_intersection
-{
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
-
- //JODO test add_intersection(c, a, b) == c += (a & b)
- static map_type& apply(map_type&, const map_type&, const domain_type&);
- static map_type& apply(map_type&, const map_type&, const element_type&);
-};
-
-
-template<class MapT>
-struct map_add_intersection<MapT, true>
-{ // is_total
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::codomain_combine codomain_combine;
- typedef typename map_type::const_iterator const_iterator;
-
- static map_type& apply(map_type& section, const map_type& object, const domain_type& key_value)
- {
- const_iterator it_ = object.find(key_value);
- if(it_ != object.end())
- itl::add(section, *it_);
- return section;
- }
-
- static map_type& apply(map_type& section, const map_type& object, const element_type& value_pair)
- {
- itl::add(section, value_pair); //JODO test this
- return section;
- }
-};
-
-template<class MapT>
-struct map_add_intersection<MapT, false>
-{ // !is_total
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::codomain_intersect codomain_intersect;
- typedef typename map_type::const_iterator const_iterator;
-
- BOOST_STATIC_CONSTANT(bool, absorbs = (absorbs_neutrons<MapT>::value));
-
- static map_type& apply(map_type& section, const map_type& object, const domain_type& key_value)
- {
- const_iterator it_ = object.find(key_value);
- if(it_ != object.end())
- map_add<map_type,codomain_intersect,absorbs>::apply(section, *it_);
-
- return section;
- }
-
- static map_type& apply(map_type& section, const map_type& object, const element_type& value_pair)
- {
- const_iterator it_ = object.find(value_pair.first);
- if(it_ != object.end())
- {
- map_add<map_type,codomain_intersect,absorbs>::apply(section, *it_);
- map_add<map_type,codomain_intersect,absorbs>::apply(section, value_pair);
- }
- return section;
- }
-};
-
-//------------------------------------------------------------------------------
-//-P inplace_intersect
-//------------------------------------------------------------------------------
-
-template<class MapT, bool is_total>
-struct map_inplace_intersect
-{
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
-
- //JODO test add_intersection(c, a, b) == c += (a & b)
- static map_type& apply(map_type&, const element_type&);
- static map_type& apply(map_type&, const map_type&);
-};
-
-
-template<class MapT>
-struct map_inplace_intersect<MapT, true>
-{ // is_total
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
-
- static map_type& apply(map_type& object, const element_type& operand)
- {
- object += operand;
- return object;
- }
-
- static map_type& apply(map_type& object, const map_type& operand)
- {
- object += operand;
- return object;
- }
-};
-
-template<class MapT>
-struct map_inplace_intersect<MapT, false>
-{ // !is_total
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::codomain_intersect codomain_intersect;
- typedef typename map_type::const_iterator const_iterator;
-
- static MapT& apply(MapT& object, const element_type& operand)
- {
- MapT section;
- map_add_intersection<MapT,false>::apply(section, object, operand);
- object.swap(section);
- return object;
- }
-
- static MapT& apply(MapT& object, const MapT& operand)
- {
- MapT section;
- //CL map_add_intersection<MapT,false>::apply(section, object, operand);
-
- const_iterator common_lwb_;
- const_iterator common_upb_;
- if(Set::common_range(common_lwb_, common_upb_, operand, object))
- {
- const_iterator sec_ = common_lwb_;
- while(sec_ != common_upb_)
- {
- const_iterator it_ = object.find(sec_->first);
- if(it_ != object.end())
- {
- itl::add(section, *it_);
- map_add<MapT, codomain_intersect, absorbs_neutrons<MapT>::value >::apply(section, *sec_);
- }
- ++sec_;
- }
- }
-
- object.swap(section);
- return object;
- }
-
-};
-
-//------------------------------------------------------------------------------
-//-P intersects
-//------------------------------------------------------------------------------
-template<class MapT, bool is_total>
-struct map_intersects
-{
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::set_type set_type;
-
- static bool apply(map_type&, const domain_type&);
- static bool apply(map_type&, const element_type&);
- static bool apply(map_type&, const set_type&);
- static bool apply(map_type&, const map_type&);
-};
-
-
-template<class MapT>
-struct map_intersects<MapT, true>
-{ // is_total
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::set_type set_type;
-
- static bool apply(map_type&, const domain_type&) {return true;}
- static bool apply(map_type&, const element_type&){return true;}
- static bool apply(map_type&, const set_type&) {return true;}
- static bool apply(map_type&, const map_type&) {return true;}
-};
-
-template<class MapT>
-struct map_intersects<MapT, false>
-{ // !is_total
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::set_type set_type;
-
- static bool apply(const MapT& object, const domain_type& key)
- {
- return object.contains(key);
- }
-
- static bool apply(const MapT& object, const element_type& key_value_pair)
- {
- MapT intersection;
- map_add_intersection<MapT,false>::apply(intersection, object, key_value_pair);
- return !intersection.empty();
- }
-
- static bool apply(const MapT& object, const set_type& key_set)
- {
- if(object.iterative_size() < key_set.iterative_size())
- return Map::intersects(object, key_set);
- else
- return Map::intersects(key_set, object);
- }
-
- static bool apply(const MapT& object, const MapT& operand)
- {
- if(object.iterative_size() < operand.iterative_size())
- return Map::intersects(object, operand);
- else
- return Map::intersects(operand, object);
- }
-};
-
-
-//==============================================================================
-//=P Symmetric difference
-//==============================================================================
-
-template<class MapT, bool codomain_is_set>
-struct map_flip_
-{
- typedef MapT map_type;
- typedef typename map_type::element_type element_type;
-
- static void apply(MapT&, const element_type&);
- static void apply(MapT&, const MapT&);
-};
-
-template<class MapT, bool is_total, bool absorbs_neutrons>
-struct map_flip
-{
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::element_type element_type;
-
- static map_type& apply(map_type&, const element_type&);
- static map_type& apply(map_type&, const map_type&);
-};
-
-template<class MapT>
-struct map_flip<MapT, true, true>
-{ // is_total, absorbs_neutrons
- typedef MapT map_type;
- typedef typename map_type::element_type element_type;
-
- static map_type& apply(map_type& object, const element_type&)
- {
- itl::clear(object);
- return object;
- }
-
- static map_type& apply(map_type& object, const map_type&)
- {
- itl::clear(object);
- return object;
- }
-};
-
-template<class MapT>
-struct map_flip<MapT, true, false>
-{ // is_total, !absorbs_neutrons
- typedef MapT map_type;
- typedef typename map_type::codomain_type codomain_type;
- BOOST_STATIC_CONSTANT(bool, codomain_is_set = (has_set_semantics<codomain_type>::value));
-
- static map_type& apply(map_type& object, const map_type& operand)
- {
- map_flip_<MapT,codomain_is_set>::apply(object, operand);
-
- ITL_FORALL(typename MapT, it_, object)
- it_->second = neutron<codomain_type>::value();
-
- return object;
- }
-};
-
-template<class MapT, bool absorbs_neutrons>
-struct map_flip<MapT, false, absorbs_neutrons>
-{ // !is_total
- typedef MapT map_type;
- typedef typename map_type::codomain_type codomain_type;
- BOOST_STATIC_CONSTANT(bool, codomain_is_set = (has_set_semantics<codomain_type>::value));
-
- static map_type& apply(map_type& object, const map_type& operand)
- {
- map_flip_<MapT,codomain_is_set>::apply(object, operand);
- return object;
- }
-};
-
-//------------------------------------------------------------------------------
-template<class MapT>
-struct map_flip_<MapT, false>
-{ // !codomain_is_set
- typedef MapT map_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::iterator iterator;
- typedef typename map_type::const_iterator const_iterator;
-
- static void apply(MapT& result, const element_type& value_pair)
- {
- std::pair<iterator,bool> insertion = itl::insert(result, value_pair);
-
- if(!insertion.second)
- MapT::subtract_::apply(result, *insertion.first);
- }
-
- static void apply(MapT& result, const MapT& x2)
- {
- const_iterator x2_ = x2.begin();
- while(x2_ != x2.end())
- apply(result, *x2_++);
- }
-};
-
-
-template<class MapT>
-struct map_flip_<MapT, true>
-{ // codomain_is_set
- typedef MapT map_type;
- typedef typename map_type::domain_type domain_type;
- typedef typename map_type::codomain_type codomain_type;
- typedef typename map_type::element_type element_type;
- typedef typename map_type::iterator iterator;
- typedef typename map_type::const_iterator const_iterator;
- typedef typename map_type::inverse_codomain_intersect
- inverse_codomain_intersect;
-
- static void apply(MapT& result, const element_type& value_pair)
- {
- std::pair<iterator,bool> insertion = itl::insert(result, value_pair);
-
- if(!insertion.second)
- {
- iterator res_ = insertion.first;
- codomain_type common_value = res_->second;
- domain_type key_value = res_->first;
- inverse_codomain_intersect()(common_value, value_pair.second);
- MapT::subtract_::apply(result, *res_);
- itl::add(result, element_type(key_value, common_value));
- }
- }
-
- static void apply(MapT& result, const MapT& x2)
- {
- const_iterator x2_ = x2.begin();
- while(x2_ != x2.end())
- apply(result, *x2_++);
- }
-};
-
-//=============================================================================
-//=P Neutron absorbtion
-//=============================================================================
-
-template<class MapT, bool absorbs_neutrons>
-struct map_absorb_neutrons
-{
- static MapT& apply(MapT&);
-};
-
-template<class MapT>
-struct map_absorb_neutrons<MapT, false>
-{ // !absorbs_neutrons
- static MapT& apply(MapT& object){ return object; }
-};
-
-
-template<class MapT>
-struct map_absorb_neutrons<MapT, true>
-{ // absorbs_neutrons
- typedef typename MapT::element_type element_type;
-
- static MapT& apply(MapT& object)
- {
- return itl::erase_if(content_is_neutron<element_type>(), object);
- }
-};
-
-
-}} // namespace itl boost
-
-#endif
-
Deleted: sandbox/itl/boost/itl/functions.hpp
==============================================================================
--- sandbox/itl/boost/itl/functions.hpp 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,76 +0,0 @@
-/*-----------------------------------------------------------------------------+
-Copyright (c) 2008-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_ITL_FUNCTIONS_HPP_JOFA_090803
-#define BOOST_ITL_FUNCTIONS_HPP_JOFA_090803
-
-#include <boost/mpl/and.hpp>
-#include <boost/mpl/or.hpp>
-#include <boost/utility/enable_if.hpp>
-#include <boost/itl/type_traits/domain_type_of.hpp>
-#include <boost/itl/type_traits/interval_type_of.hpp>
-#include <boost/itl/type_traits/element_type_of.hpp>
-#include <boost/itl/type_traits/segment_type_of.hpp>
-#include <boost/itl/type_traits/is_interval_container.hpp>
-#include <boost/itl/type_traits/is_interval_separator.hpp>
-#include <boost/itl/type_traits/is_interval_splitter.hpp>
-#include <boost/itl/type_traits/is_interval_joiner.hpp>
-#include <boost/itl/type_traits/is_element_container.hpp>
-#include <boost/itl/type_traits/is_combinable.hpp>
-#include <boost/itl/type_traits/is_fragment_type_of.hpp>
-#include <boost/itl/detail/interval_map_algo.hpp>
-
-#include <boost/itl/concept/abstract/container.hpp>
-
-#include <boost/itl/concept/interval/base.hpp>
-#include <boost/itl/concept/interval/set.hpp>
-#include <boost/itl/concept/interval/map.hpp>
-#include <boost/itl/concept/interval/set_or_map.hpp>
-
-
-namespace boost{namespace itl
-{
-
-//==============================================================================
-//= Containedness
-//==============================================================================
-//==============================================================================
-//= Equivalences and Orderings
-//==============================================================================
-//==============================================================================
-//= Addition
-//==============================================================================
-//==============================================================================
-//= Insertion
-//==============================================================================
-//==============================================================================
-//= Erasure
-//==============================================================================
-//==============================================================================
-//= Subtraction
-//==============================================================================
-//------------------------------------------------------------------------------
-//- set (selective update)
-//------------------------------------------------------------------------------
-//==============================================================================
-//= Intersection
-//==============================================================================
-//==============================================================================
-//= Symmetric difference
-//==============================================================================
-//==============================================================================
-//= Domain
-//==============================================================================
-//==============================================================================
-//= Streaming
-//==============================================================================
-
-}} // namespace itl boost
-
-#endif
-
-
Modified: sandbox/itl/boost/itl/interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_set.hpp 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
@@ -13,7 +13,12 @@
#include <boost/itl/rightopen_interval.hpp> //JODO REV?
#include <boost/itl/type_traits/is_interval_joiner.hpp>
#include <boost/itl/interval_base_set.hpp>
-#include <boost/itl/functions.hpp>
+//CL #include <boost/itl/functions.hpp>
+#include <boost/itl/concept/interval/base.hpp>
+#include <boost/itl/concept/interval/set.hpp>
+#include <boost/itl/concept/interval/map.hpp>
+#include <boost/itl/concept/interval/set_or_map.hpp>
+
namespace boost{namespace itl
{
Deleted: sandbox/itl/boost/itl/map_functions.hpp
==============================================================================
--- sandbox/itl/boost/itl/map_functions.hpp 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -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_ITL_MAP_FUNCTIONS_HPP_JOFA_100824
-#define BOOST_ITL_MAP_FUNCTIONS_HPP_JOFA_100824
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/detail/map_algo.hpp>
-//CL #include <boost/itl/detail/map_functors.hpp>
-#include <boost/itl/type_traits/is_element_container.hpp>
-#include <boost/itl/type_traits/is_key_container_of.hpp>
-
-//CL#include <boost/itl/functions/container.hpp>
-//#include <boost/itl/functions/associative_element_container.hpp>
-
-#include <boost/itl/concept/abstract/container.hpp>
-#include <boost/itl/concept/element/set_or_map.hpp>
-
-
-namespace boost{namespace itl
-{
-
-//JODO remove file
-
-}} // namespace itl boost
-
-#endif // BOOST_ITL_MAP_FUNCTIONS_HPP_JOFA_100824
-
Deleted: sandbox/itl/boost/itl/set_functions.hpp
==============================================================================
--- sandbox/itl/boost/itl/set_functions.hpp 2010-09-23 12:26:06 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,27 +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_ITL_SET_FUNCTIONS_HPP_JOFA_100827
-#define BOOST_ITL_SET_FUNCTIONS_HPP_JOFA_100827
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/type_traits/is_element_container.hpp>
-#include <boost/itl/detail/map_algo.hpp>
-
-#include <boost/itl/functions/container.hpp>
-#include <boost/itl/functions/associative_element_container.hpp>
-
-
-namespace boost{namespace itl
-{
-
-//JODO remove file
-
-}} // namespace itl boost
-
-#endif // BOOST_ITL_SET_FUNCTIONS_HPP_JOFA_100827
-
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk