/// <summary>Initialize the queue.</summary> /// <param name="queue">The queue is intialized with a shalled-copy of this queue.</param> public PriorityQueue(PriorityQueue queue) { _heap = queue._heap.Clone(); }
/// <summary>Initialize the synchronized heap.</summary> /// <param name="heap">The heap to synchronize.</param> internal SyncBinaryHeap(BinaryHeap heap) { _heap = heap; }
/// <summary>Initialize the queue.</summary> public PriorityQueue() { _heap = new BinaryHeap(); }
/// <summary>Initialize the heap with another heap.</summary> /// <param name="heap">The heap on which to perform a shallow-copy.</param> public BinaryHeap(BinaryHeap heap) { // Clone the list (the only state we have) _list = (ArrayList)heap._list.Clone(); }