reverse modifications of Modifiable_priority_queue.h should not be modified in 64193

This commit is contained in:
Sébastien Loriot 2011-06-17 12:48:11 +00:00
parent cacb699937
commit 2254e9b4f8
1 changed files with 6 additions and 14 deletions

View File

@ -24,7 +24,7 @@
#ifdef CGAL_SURFACE_MESH_SIMPLIFICATION_USE_RELAXED_HEAP
#include <boost/pending/relaxed_heap.hpp>
#else
#include <CGAL/internal/boost/mutable_queue.hpp>
#include <boost/pending/mutable_queue.hpp>
namespace CGAL {
@ -32,17 +32,15 @@ namespace CGAL {
template <class IndexedType,
class RandomAccessContainer = std::vector<IndexedType>,
class Comp = std::less<typename RandomAccessContainer::value_type>,
class ID = ::boost::identity_property_map >
class mutable_queue_with_remove : public internal::boost::mutable_queue<IndexedType,RandomAccessContainer,Comp,ID>
class ID = boost::identity_property_map >
class mutable_queue_with_remove : public boost::mutable_queue<IndexedType,RandomAccessContainer,Comp,ID>
{
typedef internal::boost::mutable_queue<IndexedType,RandomAccessContainer,Comp,ID> Base;
typedef boost::mutable_queue<IndexedType,RandomAccessContainer,Comp,ID> 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) {
this->index_array = typename Base::IndexArray(n,n);
}
mutable_queue_with_remove(size_type n, const Comp& x=Comp(), const ID& _id=ID()) : Base(n,x,_id) {}
void remove(const IndexedType& x){
//first place element at the top
@ -53,13 +51,7 @@ public:
while (node.has_parent())
node.swap(node.parent(), this->index_array);
//then pop it
pop();
}
void pop(){
size_type id_front = get(this->id, this->c.front());
static_cast<Base*>(this)->pop();
this->index_array[ id_front ] = this->index_array.size();
this->pop();
}
bool contains(const IndexedType& x) const {