Class MinimumDirectedSpanningTreeAbstract

    • Constructor Detail

      • MinimumDirectedSpanningTreeAbstract

        public MinimumDirectedSpanningTreeAbstract()
        Default constructor.
    • Method Detail

      • computeMinimumDirectedSpanningTree

        public <V,​E> MinimumSpanningTree.Result<V,​E> computeMinimumDirectedSpanningTree​(Graph<V,​E> g,
                                                                                                    WeightFunction<E> w,
                                                                                                    V root)
        Description copied from interface: MinimumDirectedSpanningTree
        Compute a minimum directed spanning tree (MDST) in a directed graph, rooted at the given vertex.

        Note that the returned spanning tree is a single tree that span only the vertices reachable from the root, and not a forest that span the whole graph.

        If g is an IntGraph, a MinimumSpanningTree.IResult object will be returned. In that case, its better to pass a IWeightFunction as w to avoid boxing/unboxing.

        Specified by:
        computeMinimumDirectedSpanningTree in interface MinimumDirectedSpanningTree
        Type Parameters:
        V - the vertices type
        E - the edges type
        Parameters:
        g - a directed graph
        w - an edge weight function
        root - vertex in the graph the spanning tree will be rooted from
        Returns:
        all edges composing the spanning tree