a monotone queue of ADS without decrease-key, Q either DialQueue< int , K > or RadixHeap< int , K >, as a heap of LEMON by the lazy deletion
More...
#include <ADS/interop/lemon/Heaps.h>
|
| | MonotoneHeap (ItemIntMap &m) |
| | the empty heap on the map \( m \)
|
| template<class C> |
| | MonotoneHeap (ItemIntMap &m, const C &) |
| | the empty heap on the map \( m \), the comparator, which must be std::less, not kept
|
| int | size (void) const |
| | the number of items
|
| bool | empty (void) const |
| | whether there is no item
|
| void | clear (void) |
| | all the items removed, the map left as it is
|
| void | push (const Item &i, const Prio &p) |
| | inserts \( i \) with the priority \( p \), in a new slot
|
| void | push (const Pair &x) |
| | inserts the pair \( x \)
|
| Item | top (void) const |
| | the item of least priority
|
| Prio | prio (void) const |
| | the least priority
|
| void | pop (void) |
| | removes the item of least priority, POST_HEAP from now on
|
| Prio | operator[] (const Item &i) const |
| | the priority of the item \( i \)
|
| void | decrease (const Item &i, const Prio &p) |
| | the priority of \( i \) set to \( p \) by a new copy, the old one stale
|
| void | increase (const Item &i, const Prio &p) |
| | as decrease(): the copy of the smaller priority goes stale
|
| void | erase (const Item &i) |
| | removes the item \( i \), if it is in the heap; its copies go stale
|
| void | set (const Item &i, const Prio &p) |
| | the priority of \( i \) set to \( p \), inserting it if needed
|
| State | state (const Item &i) const |
| | the state of the item \( i \), read from the map
|
| void | state (const Item &i, State st) |
| | the state of \( i \) set to \( st \), removing it from the heap if it was there; IN_HEAP changes nothing
|
template<class Q, class PR, class IM>
class ADS::lemon_interop::MonotoneHeap< Q, PR, IM >
a monotone queue of ADS without decrease-key, Q either DialQueue< int , K > or RadixHeap< int , K >, as a heap of LEMON by the lazy deletion
◆ Item
template<class Q, class PR, class IM>
◆ ItemIntMap
template<class Q, class PR, class IM>
◆ Pair
template<class Q, class PR, class IM>
an item with its priority
◆ Prio
template<class Q, class PR, class IM>
◆ State
template<class Q, class PR, class IM>
the states of an item, those of LEMON
| Enumerator |
|---|
| IN_HEAP | |
| PRE_HEAP | |
| POST_HEAP | |
◆ MonotoneHeap() [1/2]
template<class Q, class PR, class IM>
the empty heap on the map \( m \)
◆ MonotoneHeap() [2/2]
template<class Q, class PR, class IM>
template<class C>
the empty heap on the map \( m \), the comparator, which must be std::less, not kept
◆ clear()
template<class Q, class PR, class IM>
all the items removed, the map left as it is
◆ decrease()
template<class Q, class PR, class IM>
the priority of \( i \) set to \( p \) by a new copy, the old one stale
- Precondition
- \( i \) is in the heap, \( p \) not less than the last priority popped
◆ empty()
template<class Q, class PR, class IM>
◆ erase()
template<class Q, class PR, class IM>
removes the item \( i \), if it is in the heap; its copies go stale
◆ increase()
template<class Q, class PR, class IM>
◆ operator[]()
template<class Q, class PR, class IM>
the priority of the item \( i \)
- Precondition
- \( i \) is in the heap
◆ pop()
template<class Q, class PR, class IM>
removes the item of least priority, POST_HEAP from now on
- Precondition
- the heap is not empty
◆ prio()
template<class Q, class PR, class IM>
the least priority
- Precondition
- the heap is not empty
◆ push() [1/2]
template<class Q, class PR, class IM>
inserts \( i \) with the priority \( p \), in a new slot
- Precondition
- \( i \) is not in the heap, \( p \ge 0 \) not less than the last priority popped
◆ push() [2/2]
template<class Q, class PR, class IM>
inserts the pair \( x \)
- Precondition
- as push()
◆ set()
template<class Q, class PR, class IM>
the priority of \( i \) set to \( p \), inserting it if needed
◆ size()
template<class Q, class PR, class IM>
◆ state() [1/2]
template<class Q, class PR, class IM>
the state of the item \( i \), read from the map
◆ state() [2/2]
template<class Q, class PR, class IM>
the state of \( i \) set to \( st \), removing it from the heap if it was there; IN_HEAP changes nothing
◆ top()
template<class Q, class PR, class IM>
the item of least priority
- Precondition
- the heap is not empty
The documentation for this class was generated from the following file: