public void TestNonEmptyHeap(int[] nums, int minValue) { BaseHeap heap = HeapHelper.CreateMinHeap(nums); Assert.False(heap.IsEmpty); Assert.True(heap.IsFull); Assert.True(heap.IsHeap()); Assert.Equal(minValue, heap.GetRoot()); Assert.Equal(minValue, heap.PopRoot()); }
public Graph(IEnumerable <INode> graph, BaseHeap <INode> pq) { if (graph == null) { throw new ArgumentNullException("Graph"); } if (pq == null) { throw new ArgumentNullException("Priority Queue"); } this.graph = graph; this.pq = pq; }
public MockedGraph(IEnumerable <INode> graph, BaseHeap <INode> pq) : base(graph, pq) { }