
|
Template Class
|
#include "boost/d_heap.hpp"
template <typename T>
class boost::d_heap_base
{
public:
class const_iterator
{
public:
const_iterator();
T const& operator* () const;
T const* operator-> () const;
const_iterator& operator++ ();
const_iterator operator++ (int);
bool operator== (const_iterator const& it) const;
bool operator!= (const_iterator const& it) const;
};
d_heap_base();
const_reference top() const;
bool empty() const;
size_type size() const;
const_iterator begin() const;
const_iterator end() const;
protected:
~d_heap_base();
};
template <typename T, typename Comp = std::less<T>, int d = 2>
class boost::d_heap: public boost::d_heap_base<T>
{
public:
typedef T value_type;
typedef T& reference;
typedef T const& const_reference;
typedef typename d_heap<T>::const_iterator const_iterator;
typedef typename std::list<node>::size_type size_type;
typedef Comp compare_type;
explicit d_heap(Comp const& comp = Comp());
pointer push(const_reference val);
void pop();
void remove(pointer ptr);
template <typename K> void change_top(K const& val);
template <typename K> void change(pointer ptr, K const& val
template <typename K> void decrease(pointer ptr, K const& val);
template <typename K> void increase(pointer ptr, K const& val);
};
|
The class
For a description of the methods of See Also
heap(3)
heap-common(3)