Lines Matching refs:heap

42     A heap is a labelled binary tree where the key of each node is less
43 than or equal to the keys of its sons. The point of a heap is that
44 we can keep on adding new elements to the heap and we can keep on
51 A heap is represented as a triple t(N, Free, Tree) where N is the
67 the heap so far is M, and the tree currently has K elements, the tree
72 the heap is O(NlgM) instead of O(NlgN). For M say 100 and N say 10^4
74 The storage cost of a heap in a copying Prolog (which Dec-10 Prolog is
80 summary:"inserts the new Key-Datum pair into the heap",
83 inserts the new Key-Datum pair into the heap. The insertion is
87 history of the heap. If you need a stable heap, you could add
88 a counter to the heap and include the counter at the time of
91 use imperative programming language, but the heap code is as
93 starting from the same heap, and they will share what common
133 is repairing the heap structure. repair_heap/4 takes a pair of
134 heaps and returns a new heap built from their elements, and the
163 summary:"reports the number of elements currently in the heap",
207 summary:"takes a list of Key-Datum pairs and forms them into a heap",
211 sort) and forms them into a heap. We could do that a wee bit
213 this algorithm makes it obvious that the result is a heap, and
231 summary:"returns the Key-Datum pair at the top of the heap",
234 returns the Key-Datum pair at the top of the heap (which is of
236 from the heap. It fails if the heap is empty.
240 summary:"returns the smallest and second smallest pairs in the heap",
244 the heap, without deleting them. It fails if the heap does not