Lines Matching refs:heap
436 top = s->heap[SMALLEST]; \
437 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
460 int v = s->heap[k];
465 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
469 if (smaller(tree, v, s->heap[j], s->depth)) break;
472 s->heap[k] = s->heap[j]; k = j;
477 s->heap[k] = v;
512 tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
515 n = s->heap[h];
556 m = s->heap[--h];
638 s->heap[++(s->heap_len)] = max_code = n;
651 node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
670 m = s->heap[SMALLEST]; /* m = node of next least frequency */
672 s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
673 s->heap[--(s->heap_max)] = m;
687 s->heap[SMALLEST] = node++;
692 s->heap[--(s->heap_max)] = s->heap[SMALLEST];