Boruvka
com.phasmidsoftware.gryphon.traverse.Boruvka
object Boruvka
Computes the minimum spanning tree of an undirected weighted graph using Borůvka's algorithm.
The algorithm (historically the oldest MST algorithm, 1926):
- Start with each vertex as its own component.
- For each component, find the minimum-weight edge crossing to another component.
- Add all such edges to the MST (merging components).
- Repeat until only one component remains.
Each round halves the number of components, giving O(E log V) overall complexity.
NOTE: this is a direct iterative algorithm and does not use the Visitor traversal engine. The per-component minimum-edge scan in each round is embarrassingly parallel and could be parallelised using parallel collections or futures (TODO).
NOTE: intended for undirected weighted graphs only.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Boruvka.type
Members list
In this article