mirror of https://github.com/CGAL/cgal
put boost file inside namespace CGAL::internal::boost
add URL and ID tags update #ifndef macros
This commit is contained in:
parent
6838175967
commit
cacb699937
|
|
@ -24,7 +24,7 @@
|
||||||
#ifdef CGAL_SURFACE_MESH_SIMPLIFICATION_USE_RELAXED_HEAP
|
#ifdef CGAL_SURFACE_MESH_SIMPLIFICATION_USE_RELAXED_HEAP
|
||||||
#include <boost/pending/relaxed_heap.hpp>
|
#include <boost/pending/relaxed_heap.hpp>
|
||||||
#else
|
#else
|
||||||
#include <boost/pending/mutable_queue.hpp>
|
#include <CGAL/internal/boost/mutable_queue.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -32,15 +32,17 @@ namespace CGAL {
|
||||||
template <class IndexedType,
|
template <class IndexedType,
|
||||||
class RandomAccessContainer = std::vector<IndexedType>,
|
class RandomAccessContainer = std::vector<IndexedType>,
|
||||||
class Comp = std::less<typename RandomAccessContainer::value_type>,
|
class Comp = std::less<typename RandomAccessContainer::value_type>,
|
||||||
class ID = boost::identity_property_map >
|
class ID = ::boost::identity_property_map >
|
||||||
class mutable_queue_with_remove : public boost::mutable_queue<IndexedType,RandomAccessContainer,Comp,ID>
|
class mutable_queue_with_remove : public internal::boost::mutable_queue<IndexedType,RandomAccessContainer,Comp,ID>
|
||||||
{
|
{
|
||||||
typedef boost::mutable_queue<IndexedType,RandomAccessContainer,Comp,ID> Base;
|
typedef internal::boost::mutable_queue<IndexedType,RandomAccessContainer,Comp,ID> Base;
|
||||||
public:
|
public:
|
||||||
typedef typename Base::size_type size_type;
|
typedef typename Base::size_type size_type;
|
||||||
typedef typename Base::Node Node;
|
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){
|
void remove(const IndexedType& x){
|
||||||
//first place element at the top
|
//first place element at the top
|
||||||
|
|
@ -51,7 +53,13 @@ public:
|
||||||
while (node.has_parent())
|
while (node.has_parent())
|
||||||
node.swap(node.parent(), this->index_array);
|
node.swap(node.parent(), this->index_array);
|
||||||
//then pop it
|
//then pop it
|
||||||
this->pop();
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool contains(const IndexedType& x) const {
|
bool contains(const IndexedType& x) const {
|
||||||
|
|
|
||||||
|
|
@ -8,13 +8,17 @@
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//
|
//
|
||||||
#ifndef BOOST_ARRAY_BINARY_TREE_HPP
|
// $URL$
|
||||||
#define BOOST_ARRAY_BINARY_TREE_HPP
|
// $Id$
|
||||||
|
//
|
||||||
|
#ifndef CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP
|
||||||
|
#define CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
|
||||||
|
namespace CGAL { namespace internal {
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -42,7 +46,7 @@ public:
|
||||||
|
|
||||||
struct children_type {
|
struct children_type {
|
||||||
struct iterator
|
struct iterator
|
||||||
: boost::iterator<std::bidirectional_iterator_tag, ArrayBinaryTreeNode,
|
: ::boost::iterator<std::bidirectional_iterator_tag, ArrayBinaryTreeNode,
|
||||||
difference_type, array_binary_tree_node*, ArrayBinaryTreeNode&>
|
difference_type, array_binary_tree_node*, ArrayBinaryTreeNode&>
|
||||||
{ // replace with iterator_adaptor implementation -JGS
|
{ // replace with iterator_adaptor implementation -JGS
|
||||||
|
|
||||||
|
|
@ -135,7 +139,7 @@ public:
|
||||||
*/
|
*/
|
||||||
template <class ExternalData>
|
template <class ExternalData>
|
||||||
inline void swap(ArrayBinaryTreeNode x, ExternalData& edata ) {
|
inline void swap(ArrayBinaryTreeNode x, ExternalData& edata ) {
|
||||||
using boost::get;
|
using ::boost::get;
|
||||||
|
|
||||||
value_type tmp = x.value();
|
value_type tmp = x.value();
|
||||||
|
|
||||||
|
|
@ -176,6 +180,6 @@ struct compare_array_node {
|
||||||
Compare comp;
|
Compare comp;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace boost
|
} } } //namespace CGAL::internal::boost
|
||||||
|
|
||||||
#endif /* BOOST_ARRAY_BINARY_TREE_HPP */
|
#endif /* CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP */
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,11 @@
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//
|
//
|
||||||
#ifndef BOOST_GRAPH_DETAIL_MUTABLE_HEAP_H
|
// $URL$
|
||||||
#define BOOST_GRAPH_DETAIL_MUTABLE_HEAP_H
|
// $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.
|
There are a few things wrong with this set of functions.
|
||||||
|
|
@ -30,6 +33,8 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace CGAL{ namespace internal {
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
template <class TreeNode, class Compare, class ExternalData>
|
template <class TreeNode, class Compare, class ExternalData>
|
||||||
|
|
@ -60,5 +65,5 @@ namespace boost {
|
||||||
(void)up_heap(x, comp, edata);
|
(void)up_heap(x, comp, edata);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} } } //namespace CGAL::internal::boost
|
||||||
#endif
|
#endif //CGAL_INTERNAL_BOOST_MUTABLE_HEAP_H
|
||||||
|
|
|
||||||
|
|
@ -8,18 +8,21 @@
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// http://www.boost.org/LICENSE_1_0.txt)
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//
|
//
|
||||||
#ifndef BOOST_MUTABLE_QUEUE_HPP
|
// $URL$
|
||||||
#define BOOST_MUTABLE_QUEUE_HPP
|
// $Id$
|
||||||
|
//
|
||||||
|
#ifndef CGAL_INTERNAL_BOOST_MUTABLE_QUEUE_HPP
|
||||||
|
#define CGAL_INTERNAL_BOOST_MUTABLE_QUEUE_HPP
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <boost/property_map/property_map.hpp>
|
#include <boost/property_map/property_map.hpp>
|
||||||
#include <boost/pending/mutable_heap.hpp>
|
#include <CGAL/internal/boost/mutable_heap.hpp>
|
||||||
#include <boost/pending/is_heap.hpp>
|
#include <CGAL/internal/boost/array_binary_tree.hpp>
|
||||||
#include <boost/graph/detail/array_binary_tree.hpp>
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
|
namespace CGAL { namespace internal {
|
||||||
namespace boost {
|
namespace boost {
|
||||||
|
|
||||||
// The mutable queue whose elements are indexed
|
// The mutable queue whose elements are indexed
|
||||||
|
|
@ -38,7 +41,7 @@ namespace boost {
|
||||||
template <class IndexedType,
|
template <class IndexedType,
|
||||||
class RandomAccessContainer = std::vector<IndexedType>,
|
class RandomAccessContainer = std::vector<IndexedType>,
|
||||||
class Comp = std::less<typename RandomAccessContainer::value_type>,
|
class Comp = std::less<typename RandomAccessContainer::value_type>,
|
||||||
class ID = identity_property_map >
|
class ID = ::boost::identity_property_map >
|
||||||
class mutable_queue {
|
class mutable_queue {
|
||||||
public:
|
public:
|
||||||
typedef IndexedType value_type;
|
typedef IndexedType value_type;
|
||||||
|
|
@ -130,6 +133,5 @@ namespace boost {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
}
|
} } } //namespace CGAL::internal::boost
|
||||||
|
#endif // CGAL_INTERNAL_BOOST_MUTABLE_QUEUE_HPP
|
||||||
#endif // BOOST_MUTABLE_QUEUE_HPP
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue