V
- E
- public class MinimumSpanningForest<V,E>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected edu.uci.ics.jung.graph.Forest<V,E> |
forest |
protected edu.uci.ics.jung.graph.Graph<V,E> |
graph |
protected java.util.Map<E,java.lang.Double> |
weights |
Constructor and Description |
---|
MinimumSpanningForest(edu.uci.ics.jung.graph.Graph<V,E> graph,
org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.Forest<V,E>> factory,
V root,
java.util.Map<E,java.lang.Double> weights)
Creates a Forest from the supplied Graph and supplied Factory, which
is used to create a new, empty Forest.
|
MinimumSpanningForest(edu.uci.ics.jung.graph.Graph<V,E> graph,
edu.uci.ics.jung.graph.Forest<V,E> forest,
V root)
Creates a minimum spanning forest from the supplied graph, populating the
supplied Forest, which must be empty.
|
MinimumSpanningForest(edu.uci.ics.jung.graph.Graph<V,E> graph,
edu.uci.ics.jung.graph.Forest<V,E> forest,
V root,
java.util.Map<E,java.lang.Double> weights)
Creates a minimum spanning forest from the supplied graph, populating the
supplied Forest, which must be empty.
|
protected java.util.Map<E,java.lang.Double> weights
public MinimumSpanningForest(edu.uci.ics.jung.graph.Graph<V,E> graph, org.apache.commons.collections4.Factory<edu.uci.ics.jung.graph.Forest<V,E>> factory, V root, java.util.Map<E,java.lang.Double> weights)
graph
- the input graphfactory
- the factory to use to create the new forestroot
- the vertex of the graph to be used as the root of the forestweights
- edge weightspublic MinimumSpanningForest(edu.uci.ics.jung.graph.Graph<V,E> graph, edu.uci.ics.jung.graph.Forest<V,E> forest, V root, java.util.Map<E,java.lang.Double> weights)
graph
- the Graph to find MST inforest
- the Forest to populate. Must be emptyroot
- first Tree root, may be nullweights
- edge weights, may be nullpublic MinimumSpanningForest(edu.uci.ics.jung.graph.Graph<V,E> graph, edu.uci.ics.jung.graph.Forest<V,E> forest, V root)
graph
- the Graph to find MST inforest
- the Forest to populate. Must be emptyroot
- first Tree root, may be null