Lines Matching defs:heap
106 /* the heap */
108 struct heap {
111 } heap [END+2];
222 /* makes a heap out of heap[i],...,heap[n] */
228 struct heap heapsubi;
229 hmove(heap[i], heapsubi);
233 if (heap[k].count > heap[k+1].count && k < n)
235 if (heapsubi.count < heap[k].count)
237 hmove(heap[k], heap[i]);
240 hmove(heapsubi, heap[i]);
254 /* put occurring chars in heap with their counts */
263 heap[++n].count = count[i];
264 heap[n].node = i;
279 parent[heap[1].node] = ++lastnode;
280 inc = heap[1].count;
281 hmove(heap[n], heap[1]);
284 parent[heap[1].node] = lastnode;
285 heap[1].node = lastnode;
286 heap[1].count += inc;