コード例 #1
0
        public static void DecreaseKey_EmptyHeap_ThrowsCorrectException()
        {
            var heap = new FibonacciHeap <int>();
            var item = new FHeapNode <int>(1);

            Assert.Throws <ArgumentException>(() => heap.DecreaseKey(item, 0));
        }
コード例 #2
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));
        }
コード例 #3
0
 public void RawCut(FHeapNode <int> x, FHeapNode <int> y)
 {
     Cut(x, y);
 }
コード例 #4
0
 public void RawCascadingCut(FHeapNode <int> y)
 {
     CascadingCut(y);
 }