2 using System.Collections.Generic;
\r
7 public class VertexHeap<T>
\r
9 public Dictionary<T, ushort> map = new Dictionary<T, ushort>();
\r
10 public List<T> verts = new List<T>();
\r
18 public ushort Add(T v)
\r
22 if(map.TryGetValue(v, out n))
\r
25 n = (ushort)verts.Count;
\r
31 public int Count { get { return verts.Count; } }
\r
32 public ushort this[T index] { get { return map[index]; } }
\r
33 public T this[int index] { get { return verts[index]; } }
\r