Lines Matching refs:heap
298 top = s->heap[SMALLEST]; \
299 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
323 int v = s->heap[k]; in pqdownheap()
328 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) { in pqdownheap()
332 if (smaller(tree, v, s->heap[j], s->depth)) break; in pqdownheap()
335 s->heap[k] = s->heap[j]; k = j; in pqdownheap()
340 s->heap[k] = v; in pqdownheap()
376 tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */ in gen_bitlen()
379 n = s->heap[h]; in gen_bitlen()
420 m = s->heap[--h]; in gen_bitlen()
504 s->heap[++(s->heap_len)] = max_code = n; in build_tree()
517 node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0); in build_tree()
536 m = s->heap[SMALLEST]; /* m = node of next least frequency */ in build_tree()
538 s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */ in build_tree()
539 s->heap[--(s->heap_max)] = m; in build_tree()
552 s->heap[SMALLEST] = node++; in build_tree()
557 s->heap[--(s->heap_max)] = s->heap[SMALLEST]; in build_tree()