public MinPriorityQueue(int capacity, IMinPriorityQueueNodePool <TKey, TValue> nodePool) { if (capacity < 0) { throw new ArgumentOutOfRangeException(nameof(capacity)); } if (nodePool == null) { nodePool = new DefaultMinPriorityQueueNodePool <TKey, TValue>(); } m_NodePool = nodePool; m_Dict = new Dictionary <TKey, MinPriorityQueueNode <TKey, TValue> >(capacity); m_MinBinaryHeap = new List <MinPriorityQueueNode <TKey, TValue> >(capacity); }
public MinPriorityQueue(IMinPriorityQueueNodePool <TKey, TValue> nodePool) : this(0, nodePool) { // Empty. }