Ionic.Zlib.DeflateManager._IsSmaller C# (CSharp) Method

_IsSmaller() static private method

static private _IsSmaller ( short tree, int n, int m, sbyte depth ) : bool
tree short
n int
m int
depth sbyte
return bool
        internal static bool _IsSmaller(short[] tree, int n, int m, sbyte[] depth)
        {
            short tn2 = tree[n * 2];
            short tm2 = tree[m * 2];
            return (tn2 < tm2 || (tn2 == tm2 && depth[n] <= depth[m]));
        }

Usage Example

Exemplo n.º 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 && DeflateManager._IsSmaller(tree, this.heap[i + 1], this.heap[i], this.depth))
                {
                    i++;
                }
                if (DeflateManager._IsSmaller(tree, num, this.heap[i], this.depth))
                {
                    break;
                }
                this.heap[k] = this.heap[i];
                k            = i;
            }
            this.heap[k] = num;
        }
All Usage Examples Of Ionic.Zlib.DeflateManager::_IsSmaller