diff --git a/STL_Extension/include/CGAL/Modifiable_priority_queue.h b/STL_Extension/include/CGAL/Modifiable_priority_queue.h index 45d25779cf9..06a6a35e274 100644 --- a/STL_Extension/include/CGAL/Modifiable_priority_queue.h +++ b/STL_Extension/include/CGAL/Modifiable_priority_queue.h @@ -24,7 +24,7 @@ #ifdef CGAL_SURFACE_MESH_SIMPLIFICATION_USE_RELAXED_HEAP #include #else -#include +#include namespace CGAL { @@ -32,15 +32,17 @@ namespace CGAL { template , class Comp = std::less, - class ID = boost::identity_property_map > -class mutable_queue_with_remove : public boost::mutable_queue + class ID = ::boost::identity_property_map > +class mutable_queue_with_remove : public internal::boost::mutable_queue { - typedef boost::mutable_queue Base; + typedef internal::boost::mutable_queue Base; public: typedef typename Base::size_type size_type; typedef typename Base::Node Node; - mutable_queue_with_remove(size_type n, const Comp& x=Comp(), const ID& _id=ID()) : Base(n,x,_id) {} + mutable_queue_with_remove(size_type n, const Comp& x=Comp(), const ID& _id=ID()) : Base(n,x,_id) { + this->index_array = typename Base::IndexArray(n,n); + } void remove(const IndexedType& x){ //first place element at the top @@ -51,7 +53,13 @@ public: while (node.has_parent()) node.swap(node.parent(), this->index_array); //then pop it - this->pop(); + pop(); + } + + void pop(){ + size_type id_front = get(this->id, this->c.front()); + static_cast(this)->pop(); + this->index_array[ id_front ] = this->index_array.size(); } bool contains(const IndexedType& x) const { diff --git a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp index 78755556c8e..990ac8594b2 100644 --- a/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp +++ b/STL_Extension/include/CGAL/internal/boost/array_binary_tree.hpp @@ -8,13 +8,17 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= // -#ifndef BOOST_ARRAY_BINARY_TREE_HPP -#define BOOST_ARRAY_BINARY_TREE_HPP +// $URL$ +// $Id$ +// +#ifndef CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP +#define CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP #include #include #include +namespace CGAL { namespace internal { namespace boost { /* @@ -42,7 +46,7 @@ public: struct children_type { struct iterator - : boost::iterator { // replace with iterator_adaptor implementation -JGS @@ -135,7 +139,7 @@ public: */ template inline void swap(ArrayBinaryTreeNode x, ExternalData& edata ) { - using boost::get; + using ::boost::get; value_type tmp = x.value(); @@ -176,6 +180,6 @@ struct compare_array_node { Compare comp; }; -} // namespace boost +} } } //namespace CGAL::internal::boost -#endif /* BOOST_ARRAY_BINARY_TREE_HPP */ +#endif /* CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP */ diff --git a/STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp b/STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp index bbc81881907..fc536fae98a 100644 --- a/STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp +++ b/STL_Extension/include/CGAL/internal/boost/mutable_heap.hpp @@ -8,8 +8,11 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= // -#ifndef BOOST_GRAPH_DETAIL_MUTABLE_HEAP_H -#define BOOST_GRAPH_DETAIL_MUTABLE_HEAP_H +// $URL$ +// $Id$ +// +#ifndef CGAL_INTERNAL_BOOST_MUTABLE_HEAP_H +#define CGAL_INTERNAL_BOOST_MUTABLE_HEAP_H /* There are a few things wrong with this set of functions. @@ -30,6 +33,8 @@ */ +namespace CGAL{ namespace internal { + namespace boost { template @@ -60,5 +65,5 @@ namespace boost { (void)up_heap(x, comp, edata); } -} -#endif +} } } //namespace CGAL::internal::boost +#endif //CGAL_INTERNAL_BOOST_MUTABLE_HEAP_H diff --git a/STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp b/STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp index 82cfdd81821..0745adf50a4 100644 --- a/STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp +++ b/STL_Extension/include/CGAL/internal/boost/mutable_queue.hpp @@ -8,18 +8,21 @@ // http://www.boost.org/LICENSE_1_0.txt) //======================================================================= // -#ifndef BOOST_MUTABLE_QUEUE_HPP -#define BOOST_MUTABLE_QUEUE_HPP +// $URL$ +// $Id$ +// +#ifndef CGAL_INTERNAL_BOOST_MUTABLE_QUEUE_HPP +#define CGAL_INTERNAL_BOOST_MUTABLE_QUEUE_HPP #include #include #include #include -#include -#include -#include +#include +#include #include +namespace CGAL { namespace internal { namespace boost { // The mutable queue whose elements are indexed @@ -38,7 +41,7 @@ namespace boost { template , class Comp = std::less, - class ID = identity_property_map > + class ID = ::boost::identity_property_map > class mutable_queue { public: typedef IndexedType value_type; @@ -130,6 +133,5 @@ namespace boost { }; -} - -#endif // BOOST_MUTABLE_QUEUE_HPP +} } } //namespace CGAL::internal::boost +#endif // CGAL_INTERNAL_BOOST_MUTABLE_QUEUE_HPP