예제 #1
0
 /// <summary>
 /// Creates a new PriorityQueue. The passed delegate will be used to compare
 /// item priorities as they are inserted into the queue.
 /// </summary>
 /// <param name="comparison">A delegate to a method that will be used to compare priorities.</param>
 public PriorityQueue(Comparison <T> comparison) :
     this(Comparers.ComparerFromComparison(comparison))
 {
 }
예제 #2
0
 /// <summary>
 /// Creates a new PriorityQueue. The passed delegate will be used to compare
 /// item priorities as they are inserted into the queue.
 /// </summary>
 /// <param name="comparison">A delegate to a method that will be used to compare priorities.</param>
 public PriorityQueueDictionary(Comparison <P> comparison) :
     this(Comparers.ComparerFromComparison(comparison))
 {
 }
예제 #3
0
 /// <summary>
 /// Creates a new PriorityQueue. The passed delegate will be used to compare
 /// item priorities as they are inserted into the queue.
 /// The PriorityQueue is initialized with all the items in the given sequence.
 /// </summary>
 /// <param name="sequence">A sequence with items to be placed into the PriorityQueue.</param>
 /// <param name="comparison">A delegate to a method that will be used to compare priorities.</param>
 public PriorityQueue(IEnumerable <T> sequence, Comparison <T> comparison) :
     this(sequence, Comparers.ComparerFromComparison(comparison))
 {
 }
예제 #4
0
 /// <summary>
 /// Creates a new PriorityQueue. The passed delegate will be used to compare item priorities as they are inserted into the queue.
 /// The PriorityQueue is initialized with all the priorities and items in Pairs in the given collection.
 /// </summary>
 /// <param name="collection"></param>
 /// <param name="comparison">A delegate to a method that will be used to compare priorities.</param>
 public PriorityQueueDictionary(IEnumerable <Pair <P, T> > collection, Comparison <P> comparison) :
     this(collection, Comparers.ComparerFromComparison(comparison))
 {
 }