uk.ac.ed.computational_geometry.util
Class MinimalSpanningTree<Value>
java.lang.Object
uk.ac.ed.computational_geometry.util.MinimalSpanningTree<Value>
public class MinimalSpanningTree<Value>
- extends Object
User: nix Date: 16-Mar-2005 Time: 15:53:50 To change this template use Options | File Templates.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
graph
protected UndirectedGraph<Value> graph
nodes
protected HashMap<Value,MinimalSpanningTree.Node> nodes
roots
protected List<MinimalSpanningTree.Node> roots
tree_edges
protected List<UndirectedGraph.Edge<Value>> tree_edges
MinimalSpanningTree
public MinimalSpanningTree(UndirectedGraph<Value> graph,
Value root_value)
MinimalSpanningTree
public MinimalSpanningTree(UndirectedGraph<Value> graph)
getRoots
public List<MinimalSpanningTree.Node> getRoots()
getEdges
public List<UndirectedGraph.Edge<Value>> getEdges()
buildUsingPrimsAlgorithm
protected void buildUsingPrimsAlgorithm(Value root_value)
buildUsingKruskalsAlgorithm
protected void buildUsingKruskalsAlgorithm()
main
public static void main(String[] args)