V
- the vertex typeE
- the edge typepublic class PrimMinimumSpanningTree<V,E>
extends java.lang.Object
implements org.apache.commons.collections4.Transformer<edu.uci.ics.jung.graph.Graph<V,E>,edu.uci.ics.jung.graph.Graph<V,E>>
Modifier and Type | Field and Description |
---|---|
protected org.apache.commons.collections4.Factory<? extends edu.uci.ics.jung.graph.Graph<V,E>> |
treeFactory |
protected org.apache.commons.collections4.Transformer<E,java.lang.Double> |
weights |
Constructor and Description |
---|
PrimMinimumSpanningTree(org.apache.commons.collections4.Factory<? extends edu.uci.ics.jung.graph.Graph<V,E>> factory)
Creates an instance which generates a minimum spanning tree assuming constant edge weights.
|
PrimMinimumSpanningTree(org.apache.commons.collections4.Factory<? extends edu.uci.ics.jung.graph.Graph<V,E>> factory,
org.apache.commons.collections4.Transformer<E,java.lang.Double> weights)
Creates an instance which generates a minimum spanning tree using the input edge weights.
|
Modifier and Type | Method and Description |
---|---|
protected V |
findRoot(edu.uci.ics.jung.graph.Graph<V,E> graph) |
edu.uci.ics.jung.graph.Graph<V,E> |
transform(edu.uci.ics.jung.graph.Graph<V,E> graph) |
protected void |
updateTree(edu.uci.ics.jung.graph.Graph<V,E> tree,
edu.uci.ics.jung.graph.Graph<V,E> graph,
java.util.Collection<E> unfinishedEdges) |
protected org.apache.commons.collections4.Factory<? extends edu.uci.ics.jung.graph.Graph<V,E>> treeFactory
protected org.apache.commons.collections4.Transformer<E,java.lang.Double> weights
public PrimMinimumSpanningTree(org.apache.commons.collections4.Factory<? extends edu.uci.ics.jung.graph.Graph<V,E>> factory)
public PrimMinimumSpanningTree(org.apache.commons.collections4.Factory<? extends edu.uci.ics.jung.graph.Graph<V,E>> factory, org.apache.commons.collections4.Transformer<E,java.lang.Double> weights)