public static void Explore(UndirectedGraph graph, IReporter reporter) { var candidates = new HashSet <Vertex>(graph.ConnectedVertices()); if (candidates.Any()) { Visit( graph, reporter, candidates, new HashSet <Vertex>(capacity: candidates.Count), ImmutableArray.Create <Vertex>()); } }
public static void Explore(UndirectedGraph graph, IReporter reporter) { var candidates = new HashSet <Vertex>(graph.ConnectedVertices()); if (candidates.Any()) { Pivot.Visit( graph, reporter, Pivot.Choice.MaxDegreeLocal, candidates, new HashSet <Vertex>(), ImmutableArray.Create <Vertex>()); } }