|
STXXL
1.4-dev
|
An internal priority queue that allows removing elements addressed with (a copy of) themselves.
| KeyType | Type of contained elements. |
| PriorityType | Type of Priority. |
Definition at line 112 of file addressable_queues.h.
Inheritance diagram for stxxl::addressable_priority_queue< KeyType, PriorityType, Cmp >:Classes | |
| struct | cmp |
Public Types | |
| typedef meta_iterator | handle |
| Type of handle to an entry. For use with insert and remove. More... | |
Public Member Functions | |
| addressable_priority_queue () | |
| Create an empty queue. More... | |
| ~addressable_priority_queue () | |
| bool | empty () const |
| Check if queue is empty. More... | |
| bool | erase (const KeyType &e) |
| Erase element from the queue. More... | |
| void | erase (handle i) |
| Erase element from the queue. More... | |
| std::pair< handle, bool > | insert (const KeyType &e, const PriorityType o) |
| Insert new element. If the element is already in, it's priority is updated. More... | |
| KeyType | pop () |
| Remove top (= min) element from the queue. More... | |
| const KeyType & | top () const |
| Access top (= min) element in the queue. More... | |
Private Types | |
| typedef container_type::iterator | container_iterator |
| typedef std::set< std::pair < PriorityType, KeyType >, cmp > | container_type |
| typedef meta_type::iterator | meta_iterator |
| typedef std::map< KeyType, container_iterator > | meta_type |
Private Attributes | |
| meta_type | meta |
| container_type | vals |
|
private |
Definition at line 126 of file addressable_queues.h.
|
private |
Definition at line 125 of file addressable_queues.h.
| typedef meta_iterator stxxl::addressable_priority_queue< KeyType, PriorityType, Cmp >::handle |
Type of handle to an entry. For use with insert and remove.
Definition at line 135 of file addressable_queues.h.
|
private |
Definition at line 128 of file addressable_queues.h.
|
private |
Definition at line 127 of file addressable_queues.h.
|
inline |
Create an empty queue.
Definition at line 138 of file addressable_queues.h.
|
inline |
Definition at line 139 of file addressable_queues.h.
|
inline |
Check if queue is empty.
Definition at line 143 of file addressable_queues.h.
|
inline |
Erase element from the queue.
| e | Element to remove. |
Definition at line 166 of file addressable_queues.h.
|
inline |
Erase element from the queue.
| i | Iterator to element to remove. |
Definition at line 178 of file addressable_queues.h.
|
inline |
Insert new element. If the element is already in, it's priority is updated.
| e | Element to insert. |
| o | Priority of element. |
Definition at line 150 of file addressable_queues.h.
|
inline |
Remove top (= min) element from the queue.
Definition at line 191 of file addressable_queues.h.
|
inline |
Access top (= min) element in the queue.
Definition at line 186 of file addressable_queues.h.
|
private |
Definition at line 131 of file addressable_queues.h.
|
private |
Definition at line 130 of file addressable_queues.h.