(tree, n, m, depth)
| 10920 | * the subtrees have equal frequency. This minimizes the worst case length. |
| 10921 | */ |
| 10922 | function smaller(tree, n, m, depth) { |
| 10923 | var _n2 = n * 2; |
| 10924 | var _m2 = m * 2; |
| 10925 | return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || |
| 10926 | (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); |
| 10927 | } |
| 10928 | |
| 10929 | /* =========================================================================== |
| 10930 | * Restore the heap property by moving down the tree starting at node k, |