internal Enumerator(HeapMap <TKey, TValue> map, int getEnumeratorRetType) { this.map = map; index = 0; this.getEnumeratorRetType = getEnumeratorRetType; current = new KeyValuePair <TKey, TValue> (); }
internal Enumerator(HeapMap <TKey, TValue> map) { this.map = map; index = 0; version = map.version; currentKey = default(TValue); }
public KeyCollection(HeapMap <TKey, TValue> map) { if (map == null) { throw new ArgumentNullException(); } this.map = map; }
public static void Main(string[] args) { HeapMap <string> pq = new HeapMap <string>(); pq.Enqueue("Bob", 5); pq.Enqueue("Rob", 10); pq.Enqueue("Mike", 6); pq.Enqueue("Tina", 3); pq.Enqueue("Andy", 2); pq.Enqueue("Judy", 9); pq.UpdatePriority("Tina", 10); pq.UpdatePriority("Rob", 5); int ct = 6; while (ct > 0) { Console.WriteLine(pq.Dequeue()); ct--; } Console.WriteLine(); }
internal Enumerator(HeapMap <TKey, TValue> map) { this.map = map; index = 0; currentKey = default(TKey); }