Package org.jgrapht.alg
Class KruskalMinimumSpanningTree<V,E>
- java.lang.Object
-
- org.jgrapht.alg.KruskalMinimumSpanningTree<V,E>
-
- Type Parameters:
V
- the graph vertex typeE
- the graph edge type
- All Implemented Interfaces:
MinimumSpanningTree<V,E>
@Deprecated public class KruskalMinimumSpanningTree<V,E> extends java.lang.Object implements MinimumSpanningTree<V,E>
Deprecated.UseKruskalMinimumSpanningTree
instead.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.- Since:
- Feb 10, 2010
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Set<E>
edgeList
Deprecated.private double
spanningTreeCost
Deprecated.
-
Constructor Summary
Constructors Constructor Description KruskalMinimumSpanningTree(Graph<V,E> graph)
Deprecated.Creates and executes a new KruskalMinimumSpanningTree algorithm instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Set<E>
getMinimumSpanningTreeEdgeSet()
Deprecated.Returns edges set constituting the minimum spanning tree/forestdouble
getMinimumSpanningTreeTotalWeight()
Deprecated.Returns total weight of the minimum spanning tree/forest.
-
-
-
Field Detail
-
spanningTreeCost
private double spanningTreeCost
Deprecated.
-
edgeList
private java.util.Set<E> edgeList
Deprecated.
-
-
Constructor Detail
-
KruskalMinimumSpanningTree
public KruskalMinimumSpanningTree(Graph<V,E> graph)
Deprecated.Creates and executes a new KruskalMinimumSpanningTree algorithm instance. An instance is only good for a single spanning tree; after construction, it can be accessed to retrieve information about the spanning tree found.- Parameters:
graph
- the graph to be searched
-
-
Method Detail
-
getMinimumSpanningTreeEdgeSet
public java.util.Set<E> getMinimumSpanningTreeEdgeSet()
Deprecated.Description copied from interface:MinimumSpanningTree
Returns edges set constituting the minimum spanning tree/forest- Specified by:
getMinimumSpanningTreeEdgeSet
in interfaceMinimumSpanningTree<V,E>
- Returns:
- minimum spanning-tree edges set
-
getMinimumSpanningTreeTotalWeight
public double getMinimumSpanningTreeTotalWeight()
Deprecated.Description copied from interface:MinimumSpanningTree
Returns total weight of the minimum spanning tree/forest.- Specified by:
getMinimumSpanningTreeTotalWeight
in interfaceMinimumSpanningTree<V,E>
- Returns:
- minimum spanning-tree total weight
-
-