Beispiel #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;
 }
Beispiel #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;
 }
 private void AddUsedVertex(Arc arc)
 {
     int[] arrayOfUsedId = arc.GetAllIdInWay();
     foreach (int id in arrayOfUsedId)
     {
         if (!dictionaryOfUsedVertex.ContainsKey(id))
         {
             dictionaryOfUsedVertex.Add(id, null);
         }
     }
 }