Top Qs
Timeline
Chat
Perspective
Addressable heap
From Wikipedia, the free encyclopedia
Remove ads
In computer science, an addressable heap is an abstract data type. Specifically, it is a mergeable heap supporting access to the elements of the heap via handles (also called references). It allows the key of the element referenced by a particular handle to be removed or decreased.
This article relies largely or entirely on a single source. (May 2024) |
Definition
An addressable heap supports the following operations:[1]
Make-Heap(), creating an empty heap.Insert(H,x), inserting an elementxinto the heapH, and returning a handle to it.Min(H), returning a handle to the minimum element, orNilif no such element exists.Extract-Min(H), extracting and returning a handle to the minimum element, orNilif no such element exists.Remove(h), removing the element referenced byh(from its respective heap).Decrease-Key(h,k), decreasing the key of the element referenced byhtok; illegal ifkis larger than the key referenced byh.Merge(H1,H2), combining the elements ofH1andH2.
Remove ads
Examples
Examples of addressable heaps include:
A more complete list with performance comparisons can be found here.
References
Wikiwand - on
Seamless Wikipedia browsing. On steroids.
Remove ads