smaller() static private method

static private smaller ( short tree, int n, int m, byte depth ) : bool
tree short
n int
m int
depth byte
return bool
Example #1
0
        internal void pqdownheap(short[] tree, int k)
        {
            int num = this.heap[k];

            for (int i = k << 1; i <= this.heap_len; i <<= 1)
            {
                if (i < this.heap_len && Deflate.smaller(tree, this.heap[i + 1], this.heap[i], this.depth))
                {
                    i++;
                }
                if (Deflate.smaller(tree, num, this.heap[i], this.depth))
                {
                    break;
                }
                this.heap[k] = this.heap[i];
                k            = i;
            }
            this.heap[k] = num;
        }