Esempio n. 1
0
 static void SFD(GraphVertex ver, List <GraphVertex> comp, List <GraphVertex> visited)
 {
     visited.Add(ver);
     comp.Add(ver);
     foreach (GraphVertex cv in ver.ConnectedVerticies)
     {
         if (!visited.Contains(cv))
         {
             SFD(cv, comp, visited);
         }
     }
 }
Esempio n. 2
0
 /// Конструктор, связанная вершина, вес
 public GraphEdge(GraphVertex connectedVertex, int weight)
 {
     ConnectedVertex = connectedVertex;
     EdgeWeight      = weight;
 }