예제 #1
0
 public static Node FindNode(int index)
 {
     foreach (Node n in Nodes)
     {
         if (n.idx == index) return n;
     }
     Node n1 = new Node();
     n1.idx = index;
     return n1;
 }
예제 #2
0
 public void InitializeNodesAndEdges()
 {
     for (int i = 0; i < Nodes.Length; i++)
     {
         Nodes[i] = new Node();
     }
     for (int j = 0; j < Edge.Edges.Length; j++)
     {
         Edge.Edges[j] = new Edge();
     }
 }