public static void DecreaseKey_EmptyHeap_ThrowsCorrectException() { var heap = new FibonacciHeap <int>(); var item = new FHeapNode <int>(1); Assert.Throws <ArgumentException>(() => heap.DecreaseKey(item, 0)); }
public static void Cut_EmptyHeap_ThrowsCorrectExcpetion() { var heap = new TestFHeap(); var item1 = new FHeapNode <int>(1); var item2 = new FHeapNode <int>(2); Assert.Throws <InvalidOperationException>(() => heap.RawCut(item1, item2)); }
public void RawCut(FHeapNode <int> x, FHeapNode <int> y) { Cut(x, y); }
public void RawCascadingCut(FHeapNode <int> y) { CascadingCut(y); }