V - the vertex typeE - the edge typepublic class MinimumSpanningForest<V,E> extends Object
| Modifier and Type | Field and Description |
|---|---|
protected Forest<V,E> |
forest |
protected Graph<V,E> |
graph |
protected com.google.common.base.Function<E,Double> |
weights |
| Constructor and Description |
|---|
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.
|
MinimumSpanningForest(Graph<V,E> graph,
com.google.common.base.Supplier<Forest<V,E>> Supplier,
V root,
Map<E,Double> weights)
Creates a Forest from the supplied Graph and supplied Supplier, which
is used to create a new, empty Forest.
|
| Modifier and Type | Method and Description |
|---|---|
Forest<V,E> |
getForest() |
protected void |
updateForest(Collection<V> tv,
Collection<E> unfinishedEdges) |
public MinimumSpanningForest(Graph<V,E> graph, com.google.common.base.Supplier<Forest<V,E>> Supplier, V root, Map<E,Double> weights)
graph - the input graphSupplier - the Supplier to use to create the new forestroot - the vertex of the graph to be used as the root of the forestweights - edge weightspublic 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 nullpublic 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 nullprotected void updateForest(Collection<V> tv, Collection<E> unfinishedEdges)
Copyright © 2016. All rights reserved.