23 #ifndef AlpsPriorityQueue_h_
24 #define AlpsPriorityQueue_h_
28 #include "CoinHelperFunctions.hpp"
41 AlpsCompare<T> comparison_;
54 comparison_.strategy_ = &c;
55 std::make_heap(vec_.begin(), vec_.end(), comparison_);
59 T
top()
const {
return vec_.front(); }
64 std::push_heap(vec_.begin(), vec_.end(), comparison_);
69 std::pop_heap(vec_.begin(), vec_.end(), comparison_);
91 class Container = std::vector<T>,
92 class Compare = std::less<typename Container::value_type> >
size_t size() const
Return the size of the vector.
void pop()
Remove the top element from the heap.
const std::vector< T > & getContainer() const
Return a const reference to the container.
void clear()
Remove all elements from the vector.
T top() const
Return the top element of the heap.
void push(T x)
Add a element to the heap.
bool empty() const
Return true for an empty vector.
void setComparison(AlpsSearchStrategy< T > &c)
Set comparison function and resort heap.
AlpsPriorityQueue(AlpsSearchStrategy< T > &compare)