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); } } }
/// Конструктор, связанная вершина, вес public GraphEdge(GraphVertex connectedVertex, int weight) { ConnectedVertex = connectedVertex; EdgeWeight = weight; }