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:
parent
4b0d3d26cc
commit
c230f0ce7c
7 changed files with 264 additions and 231 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue