31#ifndef CRAB_PRIORITYQUEUE_H
32#define CRAB_PRIORITYQUEUE_H
41template<
typename Node>
44 bool (*compare)(
Node const *,
Node const *);
100template<
typename Node>
104template<
typename Node>
106 return _open.
empty();
109template<
typename Node>
114template<
typename Node>
119template<
typename Node>
124template<
typename Node>
129template<
typename Node>
134template<
typename Node>
139template<
typename Node>
iterator end()
Definition: array.h:380
iterator erase(iterator pos)
Definition: array.h:329
void insert(iterator pos, const T &element)
Definition: array.h:256
size_type size() const
Definition: array.h:316
T & back()
Definition: array.h:230
void clear()
Definition: array.h:321
void resize(size_type newSize)
Definition: array.h:412
bool empty() const
Definition: array.h:352
iterator begin()
Definition: array.h:375
void pop_back()
Definition: array.h:200
The open heap used by all cost-based search algorithms.
Definition: PriorityQueue.h:42
void remove(Node const *node)
Removes all instances of the specified node from the heap.
Definition: PriorityQueue.h:135
void clear()
Removes all nodes from the heap.
Definition: PriorityQueue.h:110
size_t size() const
Returns the number of nodes currently in the heap.
Definition: PriorityQueue.h:115
void pop()
Removes the least costly node from the heap.
Definition: PriorityQueue.h:130
bool empty() const
Returns true if the heap contains no nodes, false otherwise.
Definition: PriorityQueue.h:105
PriorityQueue(bool(*)(Node const *, Node const *))
Constructs a new PriorityQueue that heap-sorts nodes using the specified comparator.
Definition: PriorityQueue.h:101
void push(Node *node)
Pushes the specified node onto the heap.
Definition: PriorityQueue.h:120
Node * front() const
Returns the least costly node in the heap.
Definition: PriorityQueue.h:125
void enumerate(Common::Array< Node const * > &sorted) const
Enumerates all nodes in the heap so far.
Definition: PriorityQueue.h:140
It remove(It first, It last, const T &val)
Definition: algorithm.h:466
Out copy(In first, In last, Out dst)
Definition: algorithm.h:52
RandomIt upperBound(RandomIt first, RandomIt last, const V &val, Comp comp={})
Definition: algorithm.h:513
Definition: lobject.h:332