1 # ifndef AH_PRIORITY_QUEUE_H
2 # define AH_PRIORITY_QUEUE_H
4 # include <tpl_dynBinHeap.H>
24 template <
typename T,
class Compare = Aleph::less<T> >
36 template <
class Container>
39 const typename Container::iterator end = cont.end();
41 for (
typename Container::iterator it(cont.begin());
42 it != end; this->
insert(*it++));
50 Aleph::verify_iterators (beg, end);
59 T &
push(
const T & value) {
return this->
insert(value); }
78 # endif // AH_PRIORITY_QUEUE_H
T value_type
Tipo de valor que almacena la cola de prioridad.
Definition: Priority_Queue.H:30
T & push(const T &value)
Definition: Priority_Queue.H:59
T & insert(const T &item)
Definition: tpl_dynBinHeap.H:103
priority_queue()
Instancia una cola de prioridad vacía.
Definition: Priority_Queue.H:33
T getMin()
Definition: tpl_dynBinHeap.H:138
bool empty() const
Retorna true si la cola de prioridad está vacía.
Definition: Priority_Queue.H:70
Definition: tpl_dynBinHeap.H:26
void pop()
Definition: Priority_Queue.H:63
Definition: Priority_Queue.H:25
const size_t & size() const
Retorna la cardinalidad del heap.
Definition: tpl_binHeap.H:706
priority_queue(Itor beg, const Itor &end)
Definition: Priority_Queue.H:48
const T & top()
Definition: Priority_Queue.H:67
size_t size() const
Retorna la cantidad de elementos de la cola.
Definition: Priority_Queue.H:73
T & top() const
Definition: tpl_dynBinHeap.H:216
bool is_empty() const
Retorna true si el heap está vacío.
Definition: tpl_binHeap.H:709
priority_queue(Container &cont)
Instancia una cola con todos los elementos del contenedor cont.
Definition: Priority_Queue.H:37