public TarjanNoBackEdges(IGraph <T, E> graph, IEnumerable <T> subset_vertices) { _graph = graph; _work = subset_vertices; foreach (T v in _work) { if (graph.Predecessors(v).Any()) { continue; } EdgeClassifier.Classify(graph, v, ref classify); } foreach (var v in _work) { Index[v] = -1; LowLink[v] = -1; } }
public TarjanNoBackEdges(IGraph <T, E> graph) { _graph = graph; foreach (var v in _graph.Vertices) { if (graph.Predecessors(v).Any()) { continue; } EdgeClassifier.Classify(graph, v, ref classify); } foreach (var v in _graph.Vertices) { Index[v] = -1; LowLink[v] = -1; } }