Example #1
0
 public void AddVertex(V vertex)
 {
     if (vertexes == null)
     {
         vertexes = new List <V>();
     }
     vertexes.Add(vertex);
     if (edges == null)
     {
         edges = new E[1, 1];
     }
     else
     {
         edges = ArraysUtils.ResizeArray <E>(edges, edges.GetLength(0) + 1, edges.GetLength(1) + 1);
     }
 }
Example #2
0
 public void RemoveVertexAt(int index)
 {
     vertexes[index] = default(V);
     edges           = ArraysUtils.TrimArray(index, index, edges);
 }