|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgrapht.alg.KruskalMinimumSpanningTree<V,E>
public class KruskalMinimumSpanningTree<V,E>
An implementation of Kruskal's minimum spanning tree algorithm. If the given graph is connected it computes the minimum spanning tree, otherwise it computes the minimum spanning forest. The algorithm runs in time O(E log E). This implementation uses the hashCode and equals method of the vertices.
Constructor Summary | |
---|---|
KruskalMinimumSpanningTree(Graph<V,E> graph)
Creates and executes a new KruskalMinimumSpanningTree algorithm instance. |
Method Summary | |
---|---|
Set<E> |
getEdgeSet()
Deprecated. |
Set<E> |
getMinimumSpanningTreeEdgeSet()
Returns edges set constituting the minimum spanning tree/forest |
double |
getMinimumSpanningTreeTotalWeight()
Returns total weight of the minimum spanning tree/forest. |
double |
getSpanningTreeCost()
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public KruskalMinimumSpanningTree(Graph<V,E> graph)
graph
- the graph to be searchedMethod Detail |
---|
public Set<E> getMinimumSpanningTreeEdgeSet()
MinimumSpanningTree
getMinimumSpanningTreeEdgeSet
in interface MinimumSpanningTree<V,E>
public double getMinimumSpanningTreeTotalWeight()
MinimumSpanningTree
getMinimumSpanningTreeTotalWeight
in interface MinimumSpanningTree<V,E>
@Deprecated public Set<E> getEdgeSet()
@Deprecated public double getSpanningTreeCost()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |