|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.uci.ics.jung.algorithms.shortestpath.MinimumSpanningForest<V,E>
V - E - public class MinimumSpanningForest<V,E>
For the input Graph, creates a MinimumSpanningTree using a variation of Prim's algorithm.
| Field Summary | |
|---|---|
protected Forest<V,E> |
forest
|
protected Graph<V,E> |
graph
|
protected Map<E,Double> |
weights
|
| Constructor Summary | |
|---|---|
MinimumSpanningForest(Graph<V,E> graph,
org.apache.commons.collections15.Factory<Forest<V,E>> factory,
V root,
Map<E,Double> weights)
Creates a Forest from the supplied Graph and supplied Factory, which is used to create a new, empty Forest. |
|
MinimumSpanningForest(Graph<V,E> 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(Graph<V,E> graph,
Forest<V,E> forest,
V root,
Map<E,Double> weights)
Creates a minimum spanning forest from the supplied graph, populating the supplied Forest, which must be empty. |
|
| Method Summary | |
|---|---|
Forest<V,E> |
getForest()
Returns the generated forest. |
protected void |
updateForest(Collection<V> tv,
Collection<E> unfinishedEdges)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Graph<V,E> graph
protected Forest<V,E> forest
protected Map<E,Double> weights
| Constructor Detail |
|---|
public MinimumSpanningForest(Graph<V,E> graph,
org.apache.commons.collections15.Factory<Forest<V,E>> factory,
V root,
Map<E,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 weights
public MinimumSpanningForest(Graph<V,E> graph,
Forest<V,E> forest,
V root,
Map<E,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 null
public MinimumSpanningForest(Graph<V,E> 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| Method Detail |
|---|
public Forest<V,E> getForest()
protected void updateForest(Collection<V> tv,
Collection<E> unfinishedEdges)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||