예제 #1
0
 public void AddArc(Arc[] arc)
 {
     if (ArcThisVertex == null)
     {
         ArcThisVertex = arc;
     }
     else
     {
         Arc[] temp = new Arc[ArcThisVertex.Length + arc.Length];
         Array.Copy(ArcThisVertex, 0, temp, 0, ArcThisVertex.Length);
         Array.Copy(arc, 0, temp, ArcThisVertex.Length - 1, arc.Length);
         ArcThisVertex = temp;
     }
     return;
 }
예제 #2
0
 public void AddArc(Arc arc)
 {
     if (ArcThisVertex == null)
     {
         ArcThisVertex = new Arc[] { arc };
     }
     else
     {
         Arc[] temp = new Arc[ArcThisVertex.Length + 1];
         Array.Copy(ArcThisVertex, 0, temp, 0, ArcThisVertex.Length);
         temp[ArcThisVertex.Length] = arc;
         ArcThisVertex = temp;
     }
     return;
 }
예제 #3
0
 private void AddUsedVertex(Arc arc)
 {
     int[] arrayOfUsedId = arc.GetAllIdInWay();
     foreach (int id in arrayOfUsedId)
     {
         if (!dictionaryOfUsedVertex.ContainsKey(id))
         {
             dictionaryOfUsedVertex.Add(id, null);
         }
     }
 }