コード例 #1
0
ファイル: BinaryMinHeap.cs プロジェクト: pmaino1/JRPGrepo
        /// <summary>
        /// Returns a new max heap that contains all elements of this heap.
        /// </summary>
        public IMaxHeap <T> ToMaxHeap()
        {
            BinaryMaxHeap <T> newMaxHeap = new BinaryMaxHeap <T>(this.Count, this._heapComparer);

            newMaxHeap.Initialize(this._collection.ToArray());
            return(newMaxHeap);
        }