|
OpenGM
2.3.x
Discrete Graphical Model Library
|
Heap-based changable priority queue with a maximum number of elemements. More...
#include <queues.hxx>
Collaboration diagram for opengm::ChangeablePriorityQueue< T, COMPARE >:Public Types | |
| typedef T | priority_type |
| typedef int | ValueType |
| typedef ValueType | value_type |
| typedef ValueType | const_reference |
Public Member Functions | |
| ChangeablePriorityQueue (const size_t maxSize) | |
| Create an empty ChangeablePriorityQueue which can contain atmost maxSize elements. More... | |
| void | setPriorities (T newPriority) |
| set all priorities to the given value More... | |
| void | reset () |
| reset heap - priorities are not changed More... | |
| bool | empty () const |
| check if the PQ is empty More... | |
| bool | contains (const int i) const |
| check if i is an index on the PQ More... | |
| int | size () const |
| return the number of elements in the PQ More... | |
| void | push (const value_type i, const priority_type p) |
| Insert a index with a given priority. More... | |
| const_reference | top () const |
| get index with top priority More... | |
| priority_type | topPriority () const |
| get top priority More... | |
| void | pop () |
| Remove the current top element. More... | |
| priority_type | priority (const value_type i) const |
| returns the value associated with index i More... | |
| void | deleteItem (const value_type i) |
| deleqte the priority associated with index i More... | |
| void | changePriority (const value_type i, const priority_type p) |
| change priority of a given index. The index must be in the queue! Call push to auto insert / change . More... | |
Heap-based changable priority queue with a maximum number of elemements.
This pq allows to change the priorities of elements in the queue
Definition at line 66 of file queues.hxx.
| typedef ValueType opengm::ChangeablePriorityQueue< T, COMPARE >::const_reference |
Definition at line 74 of file queues.hxx.
| typedef T opengm::ChangeablePriorityQueue< T, COMPARE >::priority_type |
Definition at line 71 of file queues.hxx.
| typedef ValueType opengm::ChangeablePriorityQueue< T, COMPARE >::value_type |
Definition at line 73 of file queues.hxx.
| typedef int opengm::ChangeablePriorityQueue< T, COMPARE >::ValueType |
Definition at line 72 of file queues.hxx.
|
inline |
Create an empty ChangeablePriorityQueue which can contain atmost maxSize elements.
Definition at line 79 of file queues.hxx.
|
inline |
change priority of a given index. The index must be in the queue! Call push to auto insert / change .
Definition at line 178 of file queues.hxx.
Here is the caller graph for this function:
|
inline |
check if i is an index on the PQ
Definition at line 110 of file queues.hxx.
Here is the caller graph for this function:
|
inline |
deleqte the priority associated with index i
Definition at line 167 of file queues.hxx.
|
inline |
check if the PQ is empty
Definition at line 105 of file queues.hxx.
|
inline |
Remove the current top element.
Definition at line 153 of file queues.hxx.
|
inline |
returns the value associated with index i
Definition at line 162 of file queues.hxx.
|
inline |
Insert a index with a given priority.
If the queue contains i before this call the priority of the given index will be changed
Definition at line 126 of file queues.hxx.
Here is the call graph for this function:
|
inline |
reset heap - priorities are not changed
Definition at line 98 of file queues.hxx.
|
inline |
set all priorities to the given value
Definition at line 91 of file queues.hxx.
|
inline |
return the number of elements in the PQ
Definition at line 115 of file queues.hxx.
|
inline |
get index with top priority
Definition at line 141 of file queues.hxx.
|
inline |
get top priority
Definition at line 147 of file queues.hxx.
1.8.9.1