public void InsertAndRemoveMinimum3() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(0); var keyValuePairs = new KeyValuePair <int, int> [1]; CheckInsertAndRemoveMinimumHeap(binaryHeap, keyValuePairs, 1, 0); }
public void Insert5() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(2); var keyValuePairs = new KeyValuePair <int, int> [2]; CheckInsertHeap(binaryHeap, keyValuePairs, 2, 2); }
public void InsertAndIndexOf3() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(0); var keyValuePairs = new KeyValuePair <int, int> [1]; CheckInsertAndIndexOfHeap(binaryHeap, keyValuePairs, 1, 1); }
public void InsertAndIndexOf5() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(3); var keyValuePairs = new KeyValuePair <int, int> [2]; CheckInsertAndIndexOfHeap(binaryHeap, keyValuePairs, 3, 2); }
public void Operations1() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(0); var keyValuePairs = new KeyValuePair <bool, int> [0]; CheckOperationsHeap(binaryHeap, keyValuePairs, 0, 0); }
public void Insert1() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(0); var keyValuePairs = new KeyValuePair <int, int> [0]; CheckInsertHeap(binaryHeap, keyValuePairs, 0, 0); }
public void InsertAndEnumerate2() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(1); var keyValuePairs = new KeyValuePair <int, int> [1]; CheckInsertAndEnumerateHeap(binaryHeap, keyValuePairs, 1, 1); }
public void Operations4() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(1); var keyValuePairs = new KeyValuePair <bool, int> [2]; var s0 = new KeyValuePair <bool, int>(true, default); keyValuePairs[0] = s0; var s1 = new KeyValuePair <bool, int>(default, 16384);
public void InsertAndRemoveMinimum5() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(2); var keyValuePairs = new KeyValuePair <int, int> [2]; var s0 = new KeyValuePair <int, int>(1, default); keyValuePairs[1] = s0; CheckInsertAndRemoveMinimumHeap(binaryHeap, keyValuePairs, 2, 0); }
public void Operations3() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(0); var keyValuePairs = new KeyValuePair <bool, int> [1]; var s0 = new KeyValuePair <bool, int>(true, default); keyValuePairs[0] = s0; CheckOperationsHeap(binaryHeap, keyValuePairs, 1, 1); }
public void InsertAndEnumerate5() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(2); var keyValuePairs = new KeyValuePair <int, int> [2]; var s0 = new KeyValuePair <int, int>(995098625, default); keyValuePairs[0] = s0; var s1 = new KeyValuePair <int, int>(16384, 16384); keyValuePairs[1] = s1; CheckInsertAndEnumerateHeap(binaryHeap, keyValuePairs, 2, 2); }
public void InsertAndIndexOf6() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(2); var keyValuePairs = new KeyValuePair <int, int> [3]; var s0 = new KeyValuePair <int, int>(1, default); keyValuePairs[1] = s0; var s1 = new KeyValuePair <int, int>(int.MinValue, 1); keyValuePairs[2] = s1; CheckInsertAndIndexOfHeap(binaryHeap, keyValuePairs, 5, 3); }
public void InsertAndRemoveMinimum7() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(3); var keyValuePairs = new KeyValuePair <int, int> [3]; var s0 = new KeyValuePair <int, int>(-2147483647, default); keyValuePairs[0] = s0; var s1 = new KeyValuePair <int, int>(int.MinValue, default); keyValuePairs[2] = s1; CheckInsertAndRemoveMinimumHeap(binaryHeap, keyValuePairs, 3, 0); }
public void InsertAndEnumerate4() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(1); var keyValuePairs = new KeyValuePair <int, int> [2]; var s0 = new KeyValuePair <int, int>(414277560, default); keyValuePairs[0] = s0; var s1 = new KeyValuePair <int, int>(16384, 16384); keyValuePairs[1] = s1; CheckInsertAndEnumerateHeap(binaryHeap, keyValuePairs, 3, 2); }
public void InsertAndMinimum5() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(2); var keyValuePairs = new KeyValuePair <int, int> [2]; var s0 = new KeyValuePair <int, int>(16384, 16384); keyValuePairs[1] = s0; CheckInsertAndMinimumHeap( binaryHeap, keyValuePairs, 2, 2); }
public void InsertAndMinimum4() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(3); var keyValuePairs = new KeyValuePair <int, int> [2]; var s0 = new KeyValuePair <int, int>(int.MinValue, default); keyValuePairs[1] = s0; CheckInsertAndMinimumHeap( binaryHeap, keyValuePairs, 3, 2); }
public void InsertAndRemoveMinimum10() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(0); var keyValuePairs = new KeyValuePair <int, int> [4]; var s0 = new KeyValuePair <int, int>(int.MinValue, default); keyValuePairs[0] = s0; var s1 = new KeyValuePair <int, int>(2, default); keyValuePairs[2] = s1; var s2 = new KeyValuePair <int, int>(1, default); keyValuePairs[3] = s2; CheckInsertAndRemoveMinimumHeap(binaryHeap, keyValuePairs, 7, 0); }
public void InsertAndMinimum8() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(0); var keyValuePairs = new KeyValuePair <int, int> [2]; var s0 = new KeyValuePair <int, int>(-63, default); keyValuePairs[0] = s0; var s1 = new KeyValuePair <int, int>(-63, default); keyValuePairs[1] = s1; CheckInsertAndMinimumHeap( binaryHeap, keyValuePairs, 3, 2); }
public void Insert6() { BinaryHeap <int, int> binaryHeap = BinaryHeapFactory.Create(2); var keyValuePairs = new KeyValuePair <int, int> [6]; var s0 = new KeyValuePair <int, int>(1, default); keyValuePairs[0] = s0; var s1 = new KeyValuePair <int, int>(1073741824, default); keyValuePairs[2] = s1; var s2 = new KeyValuePair <int, int>(int.MinValue, default); keyValuePairs[3] = s2; var s3 = new KeyValuePair <int, int>(int.MinValue, 1); keyValuePairs[4] = s3; var s4 = new KeyValuePair <int, int>(11, 11); keyValuePairs[5] = s4; CheckInsertHeap(binaryHeap, keyValuePairs, 11, 6); }
public static BinaryHeap <int, int> ExampleHeapFromTopologicalSortOfDCT8() { var heap = BinaryHeapFactory.Create(20); heap.Add(0, 255); heap.Add(0, 256); heap.Add(0, 257); heap.Add(0, 258); heap.Add(0, 259); heap.Add(0, 260); heap.Add(0, 261); heap.Add(0, 262); heap.Add(2, 263); heap.Add(2, 264); heap.Add(2, 265); heap.Add(2, 266); heap.Add(2, 267); heap.Add(2, 268); heap.Add(2, 269); heap.Add(2, 270); heap.Add(1, 271); heap.Add(1, 272); heap.Add(1, 273); heap.Add(1, 274); heap.Add(1, 275); heap.Add(1, 276); heap.Add(1, 277); heap.Add(1, 278); heap.Add(2, 279); heap.Add(2, 280); heap.Add(1, 281); heap.Add(1, 282); heap.Add(1, 283); heap.Add(1, 284); heap.Add(2, 285); heap.Add(2, 286); heap.Add(2, 287); heap.Add(2, 288); heap.Add(1, 289); heap.Add(1, 290); heap.Add(1, 291); heap.Add(1, 292); heap.Add(1, 293); heap.Add(1, 294); heap.Add(1, 295); heap.Add(1, 296); heap.Add(1, 297); heap.Add(1, 298); heap.Add(1, 299); heap.Add(2, 300); heap.Add(2, 301); heap.Add(2, 302); heap.Add(2, 303); heap.Add(1, 304); heap.Add(1, 305); heap.Add(1, 306); heap.Add(1, 307); heap.Add(2, 308); heap.Add(2, 309); heap.Add(2, 310); heap.Add(1, 311); heap.Add(2, 312); heap.Add(2, 313); heap.Add(2, 314); heap.Add(1, 315); heap.Add(1, 316); heap.Add(1, 317); heap.Add(1, 318); heap.Add(2, 319); heap.Add(2, 320); heap.Add(2, 321); heap.Add(2, 322); heap.Add(2, 323); heap.Add(2, 324); heap.Add(1, 325); heap.Add(2, 326); heap.Add(2, 327); heap.Add(2, 328); heap.Add(2, 329); heap.Add(1, 330); heap.Add(1, 331); heap.Add(1, 332); heap.Add(1, 333); heap.Add(0, 334); heap.Add(0, 335); heap.Add(0, 336); heap.Add(0, 337); heap.Add(0, 338); heap.AssertInvariants(); return(heap); }