Exemple #1
0
 internal static int PercolateUp(KeyValuePair[] heapData, int size, int pos)
 {
     return(DoPercolateUp(heapData, size, pos, (keyPos, parentPos) => ComparisonCore.Compare(heapData[keyPos].Key, heapData[parentPos].Key) < 0));
 }
Exemple #2
0
 internal static int PercolateDown(KeyValuePair[] heapData, int size, int pos)
 {
     return(DoPercolateDown(heapData, size, pos, (keyPos, childPos) => ComparisonCore.Compare(heapData[keyPos].Key, heapData[childPos].Key) > 0));
 }