Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r65549 - in sandbox/itl/boost/itl: . functions
From: afojgo_at_[hidden]
Date: 2010-09-23 11:42:05


Author: jofaber
Date: 2010-09-23 11:42:04 EDT (Thu, 23 Sep 2010)
New Revision: 65549
URL: http://svn.boost.org/trac/boost/changeset/65549

Log:
Refactoring: Removed all files of directory functions. Stable{msvc-9.0, gcc-3.4.4}
Removed:
   sandbox/itl/boost/itl/functions/associative_container.hpp
   sandbox/itl/boost/itl/functions/associative_element_container.hpp
   sandbox/itl/boost/itl/functions/associative_interval_container.hpp
   sandbox/itl/boost/itl/functions/container.hpp
   sandbox/itl/boost/itl/functions/icl_container.hpp
Text files modified:
   sandbox/itl/boost/itl/interval_set.hpp | 2 --
   1 files changed, 0 insertions(+), 2 deletions(-)

Deleted: sandbox/itl/boost/itl/functions/associative_container.hpp
==============================================================================
--- sandbox/itl/boost/itl/functions/associative_container.hpp 2010-09-23 11:42:04 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,45 +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_FUNCTIONS_ASSOCIATIVE_CONTAINER_HPP_JOFA_100830
-#define BOOST_ITL_FUNCTIONS_ASSOCIATIVE_CONTAINER_HPP_JOFA_100830
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/type_traits/is_container.hpp>
-
-namespace boost{namespace itl
-{
-
-//==============================================================================
-//= Emptieness
-//==============================================================================
-
-/** Tests if the container is empty.
- Complexity: constant. */
-template<class Type>
-typename enable_if<is_container<Type>, bool>::type
-is_empty(const Type& object)
-{
- return object.begin()==object.end();
-}
-
-
-/** All content of the container is dropped.
- Complexity: linear. */
-template<class Type>
-typename enable_if<is_container<Type>, void>::type
-clear(Type& object)
-{
- object.erase(object.begin(), object.end());
-}
-
-}} // namespace itl boost
-
-
-#endif
-
-

Deleted: sandbox/itl/boost/itl/functions/associative_element_container.hpp
==============================================================================
--- sandbox/itl/boost/itl/functions/associative_element_container.hpp 2010-09-23 11:42:04 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,232 +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_FUNCTIONS_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_100831
-#define BOOST_ITL_FUNCTIONS_ASSOCIATIVE_ELEMENT_CONTAINER_HPP_JOFA_100831
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/type_traits/is_key_container_of.hpp>
-#include <boost/itl/type_traits/is_concept_equivalent.hpp>
-#include <boost/itl/type_traits/is_container.hpp>
-#include <boost/itl/type_traits/is_associative_element_container.hpp>
-
-namespace boost{namespace itl
-{
-
-//JODO Declaration forwarding for gcc-3.4.4
-template <class SetT>
-typename enable_if<is_element_set<SetT>, SetT>::type&
-add(SetT& object, const typename SetT::element_type& operand);
-
-
-//==============================================================================
-//= Size
-//==============================================================================
-template<class Type>
-typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
-size(const Type& object)
-{
- return itl::iterative_size(object);
-}
-
-template<class Type>
-typename enable_if<is_associative_element_container<Type>, typename Type::size_type>::type
-cardinality(const Type& object)
-{
- return itl::iterative_size(object);
-}
-
-
-//==============================================================================
-//= Containedness
-//==============================================================================
-
-//------------------------------------------------------------------------------
-// within
-//------------------------------------------------------------------------------
-/** 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::domain_type& key, const Type& super)
-{
- return !(super.find(key) == super.end());
-}
-
-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(itl::is_empty(sub)) return true;
- if(itl::is_empty(super)) return false;
- if(itl::size(super) < itl::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(SubT::key_value(sub_));
- if(super_ == super.end())
- return false;
- else if(!co_equal(sub_, super_, &sub, &super))
- return false;
-
- ++sub_;
- }
- return true;
-}
-
-
-//------------------------------------------------------------------------------
-// contains
-//------------------------------------------------------------------------------
-template<class Type>
-typename enable_if<is_associative_element_container<Type>, bool>::type
-contains(const Type& super, const typename Type::domain_type& key)
-{
- return itl::within(key, super);
-}
-
-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 itl::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()
- );
-}
-
-
-//==============================================================================
-//= Addition
-//==============================================================================
-template <class Type>
-inline typename enable_if<is_associative_element_container<Type>, Type>::type&
-operator += (Type& object, const typename Type::element_type& operand)
-{
- return itl::add(object, operand);
-}
-
-template <class Type>
-inline typename enable_if<is_associative_element_container<Type>, Type>::type
-operator + (Type object, const typename Type::element_type& operand)
-{
- return object += operand;
-}
-
-template <class Type>
-inline typename enable_if<is_associative_element_container<Type>, Type>::type
-operator + (const typename Type::element_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 Set::add(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 typename Type::element_type& operand)
-{
- return itl::add(object, operand);
-}
-
-template <class Type>
-inline typename enable_if<is_associative_element_container<Type>, Type>::type
-operator | (Type object, const typename Type::element_type& operand)
-{
- return object += operand;
-}
-
-template <class Type>
-inline typename enable_if<is_associative_element_container<Type>, Type>::type
-operator | (const typename Type::element_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 Set::add(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;
-}
-
-
-
-}} // namespace itl boost
-
-
-#endif
-
-

Deleted: sandbox/itl/boost/itl/functions/associative_interval_container.hpp
==============================================================================
--- sandbox/itl/boost/itl/functions/associative_interval_container.hpp 2010-09-23 11:42:04 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,192 +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_FUNCTIONS_ASSOCIATIVE_INTERVAL_CONTAINER_HPP_JOFA_100901
-#define BOOST_ITL_FUNCTIONS_ASSOCIATIVE_INTERVAL_CONTAINER_HPP_JOFA_100901
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/type_traits/is_interval_container.hpp>
-#include <boost/itl/type_traits/is_continuous.hpp>
-#include <boost/itl/detail/interval_set_algo.hpp>
-
-namespace boost{namespace itl
-{
-
-//==============================================================================
-//= Size
-//==============================================================================
-
-template<class Type>
-typename enable_if<is_interval_container<Type>, typename Type::size_type>::type
-cardinality(const Type& object)
-{
- using namespace boost::mpl;
- typedef typename Type::domain_type domain_type;
-
- return if_<
- bool_<is_continuous<domain_type>::value>,
- continuous_interval_container,
- discrete_interval_container
- >
- ::type::cardinality(object);
-}
-
-template<class Type>
-typename enable_if<is_interval_container<Type>, typename Type::difference_type>::type
-length(const Type& object)
-{
- typedef typename Type::difference_type difference_type;
- typedef typename Type::const_iterator const_iterator;
- difference_type length = neutron<difference_type>::value();
- const_iterator it_ = object.begin();
-
- while(it_ != object.end())
- length += itl::length(Type::key_value(it_++));
- return length;
-}
-
-template<class Type>
-typename enable_if<is_interval_container<Type>, std::size_t>::type
-interval_count(const Type& object)
-{
- return itl::iterative_size(object);
-}
-
-//==============================================================================
-//= Range
-//==============================================================================
-template<class ObjectT>
-typename enable_if<is_interval_container<ObjectT>,
- typename ObjectT::interval_type>::type
-hull(const ObjectT& object)
-{
- return
- itl::is_empty(object) ? neutron<typename ObjectT::interval_type>::value()
- : hull((ObjectT::key_value(object.begin())), ObjectT::key_value(object.rbegin()));
-}
-
-
-//==========================================================================
-//= Element iterator related
-//==========================================================================
-//--------------------------------------------------------------------------
-//- Forward
-//--------------------------------------------------------------------------
-template<class Type>
-typename enable_if
-<mpl::and_< is_interval_container<Type>
- , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
-typename Type::element_iterator>::type
-elements_begin(Type& object)
-{
- return typename Type::element_iterator(object.begin());
-}
-
-template<class Type>
-typename enable_if
-<mpl::and_< is_interval_container<Type>
- , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
-typename Type::element_iterator>::type
-elements_end(Type& object)
-{
- return typename Type::element_iterator(object.end());
-}
-
-template<class Type>
-typename enable_if
-<mpl::and_< is_interval_container<Type>
- , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
-typename Type::element_const_iterator>::type
-elements_begin(const Type& object)
-{
- return typename Type::element_const_iterator(object.begin());
-}
-
-template<class Type>
-typename enable_if
-<mpl::and_< is_interval_container<Type>
- , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
-typename Type::element_const_iterator>::type
-elements_end(const Type& object)
-{
- return typename Type::element_const_iterator(object.end());
-}
-
-//--------------------------------------------------------------------------
-//- Reverse
-//--------------------------------------------------------------------------
-template<class Type>
-typename enable_if
-<mpl::and_< is_interval_container<Type>
- , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
-typename Type::element_reverse_iterator>::type
-elements_rbegin(Type& object)
-{
- return typename Type::element_reverse_iterator(object.rbegin());
-}
-
-template<class Type>
-typename enable_if
-<mpl::and_< is_interval_container<Type>
- , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
-typename Type::element_reverse_iterator>::type
-elements_rend(Type& object)
-{
- return typename Type::element_reverse_iterator(object.rend());
-}
-
-template<class Type>
-typename enable_if
-<mpl::and_< is_interval_container<Type>
- , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
-typename Type::element_const_reverse_iterator>::type
-elements_rbegin(const Type& object)
-{
- return typename Type::element_const_reverse_iterator(object.rbegin());
-}
-
-template<class Type>
-typename enable_if
-<mpl::and_< is_interval_container<Type>
- , mpl::not_<is_continuous_interval<typename Type::interval_type> > >,
-typename Type::element_const_reverse_iterator>::type
-elements_rend(const Type& object)
-{
- return typename Type::element_const_reverse_iterator(object.rend());
-}
-
-//==============================================================================
-//= Equivalences and Orderings
-//==============================================================================
-
-template<class Type>
-inline typename enable_if<is_interval_container<Type>, bool>::type
-operator == (const Type& left, const Type& right)
-{
- return Set::lexicographical_equal(left, right);
-}
-
-
-template<class Type>
-inline typename enable_if<is_interval_container<Type>, bool>::type
-operator < (const Type& left, const Type& right)
-{
- typedef typename Type::segment_compare segment_compare;
- return std::lexicographical_compare(
- left.begin(), left.end(), right.begin(), right.end(),
- segment_compare()
- );
-}
-
-
-}} // namespace itl boost
-
-
-
-#endif
-
-

Deleted: sandbox/itl/boost/itl/functions/container.hpp
==============================================================================
--- sandbox/itl/boost/itl/functions/container.hpp 2010-09-23 11:42:04 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,82 +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_FUNCTIONS_CONTAINER_HPP_JOFA_100828
-#define BOOST_ITL_FUNCTIONS_CONTAINER_HPP_JOFA_100828
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/type_traits/is_container.hpp>
-
-namespace boost{namespace itl
-{
-
-//==============================================================================
-//= Emptieness
-//==============================================================================
-
-/** Tests if the container is empty.
- Complexity: constant. */
-template<class Type>
-typename enable_if<is_container<Type>, bool>::type
-is_empty(const Type& object)
-{
- return object.begin()==object.end();
-}
-
-
-/** All content of the container is dropped.
- Complexity: linear. */
-template<class Type>
-typename enable_if<is_container<Type>, void>::type
-clear(Type& object)
-{
- object.erase(object.begin(), object.end());
-}
-
-//==============================================================================
-//= Size
-//==============================================================================
-
-template<class Type>
-typename enable_if<is_container<Type>, typename Type::size_type>::type
-iterative_size(const Type& object)
-{
- return object.size();
-}
-
-//==============================================================================
-//= Swap
-//==============================================================================
-
-template<class Type>
-typename enable_if<is_container<Type>, void>::type
-swap(Type& left, Type& right)
-{
- left.swap(right); //JODO test
-}
-
-//==============================================================================
-//= Iteration
-//==============================================================================
-
-template<class Type>
-typename enable_if<is_container<Type>, typename Type::iterator>::type
-cyclic_prior(Type& object, typename Type::iterator it_)
-{ return it_ == object.begin() ? object.end() : --it_; }
-
-template<class Type>
-typename enable_if<is_container<Type>, typename Type::const_iterator>::type
-cyclic_prior(const Type& object, typename Type::const_iterator it_)
-{ return it_ == object.begin() ? object.end() : --it_; }
-
-
-}} // namespace itl boost
-
-
-#endif
-
-

Deleted: sandbox/itl/boost/itl/functions/icl_container.hpp
==============================================================================
--- sandbox/itl/boost/itl/functions/icl_container.hpp 2010-09-23 11:42:04 EDT (Thu, 23 Sep 2010)
+++ (empty file)
@@ -1,48 +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_FUNCTIONS_ICL_CONTAINER_HPP_JOFA_100831
-#define BOOST_ITL_FUNCTIONS_ICL_CONTAINER_HPP_JOFA_100831
-
-#include <boost/itl/detail/design_config.hpp>
-#include <boost/itl/type_traits/is_icl_container.hpp>
-
-namespace boost{namespace itl
-{
-
-//==============================================================================
-//= Equivalences and Orderings
-//==============================================================================
-
-template<class Type>
-inline typename enable_if<is_icl_container<Type>, bool>::type
-operator != (const Type& left, const Type& right)
-{ return !(left == right); }
-
-template<class Type>
-inline typename enable_if<is_icl_container<Type>, bool>::type
-operator > (const Type& left, const Type& right)
-{ return right < left; }
-
-/** Partial ordering which is induced by Compare */
-template<class Type>
-inline typename enable_if<is_icl_container<Type>, bool>::type
-operator <= (const Type& left, const Type& right)
-{ return !(left > right); }
-
-template<class Type>
-inline typename enable_if<is_icl_container<Type>, bool>::type
-operator >= (const Type& left, const Type& right)
-{ return !(left < right); }
-
-
-}} // 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 11:42:04 EDT (Thu, 23 Sep 2010)
@@ -13,8 +13,6 @@
 #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/associative_interval_container.hpp>
- //JODO /interval_set_or_map.hpp ?
 #include <boost/itl/functions.hpp>
 
 namespace boost{namespace itl


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