Ejemplo n.º 1
0
    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>());
        }
    }
Ejemplo n.º 2
0
    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>());
        }
    }