public void SetupAdd() { _values = new IntHeapItem[Capacity]; for (int i = 0; i < _values.Length; i++) { _values[i] = new IntHeapItem(i * 2); } _addMinHeap = new IndexMinHeap <IntHeapItem>(_values); }
public void SetupContains() { _values = new IntHeapItem[Capacity]; for (int i = 0; i < _values.Length; i++) { _values[i] = new IntHeapItem(i * 2); } _containsMinHeap = new IndexMinHeap <IntHeapItem>(_values); _containsMinHeap.Add(5); }
public void SetupRemoveFirst() { _values = new IntHeapItem[Capacity]; for (int i = 0; i < _values.Length; i++) { _values[i] = new IntHeapItem(i * 2); } _removeFirstMinHeap = new IndexMinHeap <IntHeapItem>(_values); for (int i = 0; i < _removeFirstMinHeap.Capacity; i++) { _removeFirstMinHeap.Add(i); } }