/// <summary> /// Creates a new PriorityQueue. The P must implement IComparable<P> /// or IComparable. The CompareTo method of this interface will be used to /// prioritise items as they are inserted into the queue. /// </summary> /// <exception cref="InvalidOperationException">T does not implement IComparable<TKey>.</exception> public PriorityQueue() : this(Comparers.DefaultComparer <T>()) { }
/// <summary> /// Use the default comparer for the K type. /// </summary> public KeyComparer() { comparer = Comparers.DefaultComparer <K>(); }
/// <summary> /// Creates a new PriorityQueue. The P must implement IComparable<P> /// or IComparable. /// The CompareTo method of this interface 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> public PriorityQueue(IEnumerable <T> sequence) : this(sequence, Comparers.DefaultComparer <T>()) { }
public SplayTree(IEnumerable <T> collection) : this(collection, Comparers.DefaultComparer <T>()) { }
public SplayTree() : this(Comparers.DefaultComparer <T>()) { }
/// <summary> /// Creates a new PriorityQueue. The P must implement IComparable<P> /// or IComparable. /// The CompareTo method of this interface 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 collection. /// </summary> /// <param name="collection">A collection with items to be placed into the PriorityQueue.</param> public PriorityQueueDictionary(IEnumerable <T> collection) : this(collection, Comparers.DefaultComparer <P>()) { }
/// <summary> /// Creates a new PriorityQueue. The P must implement IComparable<P> /// or IComparable. The CompareTo method of this interface will be used to /// prioritise items as they are inserted into the queue. /// </summary> /// <exception cref="InvalidOperationException">T does not implement IComparable<TKey>.</exception> public PriorityQueueDictionary() : this(Comparers.DefaultComparer <P>()) { }