diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-10-05 13:20:29 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2009-10-05 13:20:29 -0400 |
commit | f8ed8c406d70b9a040807a01de5296d8832cafd7 (patch) | |
tree | 6fa8fa64a669fa64955c5b2e570e023b33a31e50 /include/litmus | |
parent | d278c1c93b03f6617d7137a79561639ad1845f71 (diff) |
binomial heap: support decrease() operation
Used to adjust position of heap node after
the key of the node was decreased
(= made more important). Cannot be used if
key was increased (= made less important).
Diffstat (limited to 'include/litmus')
-rw-r--r-- | include/litmus/heap.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/litmus/heap.h b/include/litmus/heap.h index 19230f550f..da959b0bec 100644 --- a/include/litmus/heap.h +++ b/include/litmus/heap.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* heaps.h -- Binomial Heaps | 1 | /* heaps.h -- Binomial Heaps |
2 | * | 2 | * |
3 | * (c) 2008 Bjoern Brandenburg | 3 | * (c) 2008, 2009 Bjoern Brandenburg |
4 | */ | 4 | */ |
5 | 5 | ||
6 | #ifndef HEAP_H | 6 | #ifndef HEAP_H |
@@ -57,6 +57,9 @@ struct heap_node* heap_peek(heap_prio_t higher_prio, | |||
57 | struct heap_node* heap_take(heap_prio_t higher_prio, | 57 | struct heap_node* heap_take(heap_prio_t higher_prio, |
58 | struct heap* heap); | 58 | struct heap* heap); |
59 | 59 | ||
60 | void heap_uncache_min(heap_prio_t higher_prio, struct heap* heap); | ||
61 | int heap_decrease(heap_prio_t higher_prio, struct heap_node* node); | ||
62 | |||
60 | void heap_delete(heap_prio_t higher_prio, | 63 | void heap_delete(heap_prio_t higher_prio, |
61 | struct heap* heap, | 64 | struct heap* heap, |
62 | struct heap_node* node); | 65 | struct heap_node* node); |