Lines Matching defs:node
423 /* Index within the heap array of least frequent node in the Huffman tree */
446 * Restore the heap property by moving down the tree starting at node k,
447 * exchanging a node with the smallest of its two sons if necessary, stopping
454 int k; /* node to move down */
517 if (n > max_code) continue; /* not a leaf node */
624 int node; /* new node being created */
647 node = s->heap[++(s->heap_len)] = (max_code < 2 ? ++max_code : 0);
648 tree[node].Freq = 1;
649 s->depth[node] = 0;
650 s->opt_len--; if (stree) s->static_len -= stree[node].Len;
651 /* node is 0 or 1 so it does not have extra bits */
663 node = elems; /* next internal node of the tree */
665 pqremove(s, tree, n); /* n = node of least frequency */
666 m = s->heap[SMALLEST]; /* m = node of next least frequency */
671 /* Create a new node father of n and m */
672 tree[node].Freq = tree[n].Freq + tree[m].Freq;
673 s->depth[node] = (uch)((s->depth[n] >= s->depth[m] ?
675 tree[n].Dad = tree[m].Dad = (ush)node;
679 node, tree[node].Freq, n, tree[n].Freq, m, tree[m].Freq);
682 /* and insert the new node in the heap */
683 s->heap[SMALLEST] = node++;