Package squidpony.squidai.graph
Class UndirectedGraphAlgorithms<V>
java.lang.Object
squidpony.squidai.graph.Algorithms<V>
squidpony.squidai.graph.UndirectedGraphAlgorithms<V>
- Type Parameters:
V
- the vertex type; oftenCoord
public class UndirectedGraphAlgorithms<V> extends Algorithms<V>
Algorithms specific to undirected graphs, like
DefaultGraph
, as well as general Algorithms
.
Currently, this only adds a findMinimumWeightSpanningTree()
method.- Author:
- earlygrey
-
Method Summary
Modifier and Type Method Description Graph<V>
findMinimumWeightSpanningTree()
Find a minimum weight spanning tree using Kruskal's algorithm.Methods inherited from class squidpony.squidai.graph.Algorithms
breadthFirstSearch, breadthFirstSearch, depthFirstSearch, depthFirstSearch, detectCycle, findMinimumDistance, findShortestPath, findShortestPath, findShortestPath, lastRunID
-
Method Details
-
findMinimumWeightSpanningTree
Find a minimum weight spanning tree using Kruskal's algorithm.- Returns:
- a Graph object containing a minimum weight spanning tree (if this graph is connected - in general a minimum weight spanning forest)
-