com.phasmidsoftware.gryphon.traverse.MST
Computes minimum spanning trees using Prim's algorithm. Delegates to PrimTraversal from the GraphTraversal family.
Attributes
- Graph
-
- Supertypes
-
class Object
trait Matchable
class Any
- Self type
-
Members list
Runs Prim's algorithm from start, returning the MST as a traversal result.
Runs Prim's algorithm from start, returning the MST as a traversal result.
Each entry v → edge in the result records the cheapest edge connecting v to the growing MST. The start vertex is absent (it has no predecessor).
Type parameters
- E
-
the edge-weight type; must be Monoid and Ordering.
- V
-
the vertex type.
Value parameters
- random
-
controls adjacency ordering.
- start
-
the source vertex.
- traversable
-
the weighted undirected graph.
Attributes
- Returns
-
a TraversalResult[V, Edge[V, E]] mapping each MST vertex to its cheapest incoming edge.