Lines Matching refs:heap
440 top = s->heap[SMALLEST]; \
441 s->heap[SMALLEST] = s->heap[s->heap_len--]; \
464 int v = s->heap[k];
469 smaller(tree, s->heap[j+1], s->heap[j], s->depth)) {
473 if (smaller(tree, v, s->heap[j], s->depth)) break;
476 s->heap[k] = s->heap[j]; k = j;
481 s->heap[k] = v;
516 tree[s->heap[s->heap_max]].Len = 0; /* root of the heap */
519 n = s->heap[h];
560 m = s->heap[--h];
642 s->heap[++(s->heap_len)] = max_code = n;
655 node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
674 m = s->heap[SMALLEST]; /* m = node of next least frequency */
676 s->heap[--(s->heap_max)] = n; /* keep the nodes sorted by frequency */
677 s->heap[--(s->heap_max)] = m;
691 s->heap[SMALLEST] = node++;
696 s->heap[--(s->heap_max)] = s->heap[SMALLEST];