Renamed UnintrusivePriorityQueue to PairPriorityQueue; Switched PairPriorityQueue to work on PriorityItemPairs instead of eating up the priority value once the item was added; PriorityQueue and PairPriorityQueue now both work on the default comparer or use a custom comparer specified in the constructor

git-svn-id: file:///srv/devel/repo-conversion/nusu@45 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
Markus Ewald 2007-09-05 18:20:10 +00:00
parent 4b0d3d26cc
commit c230f0ce7c
7 changed files with 264 additions and 231 deletions

View file

@ -94,6 +94,11 @@ namespace Nuclex.Support.Collections {
#endregion // class Enumerator
/// <summary>
/// Initializes a new priority queue using IComparable for comparing items
/// </summary>
public PriorityQueue() : this(Comparer<ItemType>.Default) { }
/// <summary>Initializes a new priority queue</summary>
/// <param name="comparer">Comparer to use for ordering the items</param>
public PriorityQueue(IComparer<ItemType> comparer) {