Interface MinimumSpanningTreeAlgorithm

All Known Implementing Classes:
BoruvkaMinimumSpanningTreeBase, BoruvkaMinimumSpanningTreeDefault, BoruvkaMinimumSpanningTreeParallel, KruskalMinimumSpanningTree, MinimumSpanningTreeBase, ParallelFilterKruskal, PrimMinimumSpanningTree

public interface MinimumSpanningTreeAlgorithm
A minimum spanning tree (MST) is an acyclic subgraph of an edge-weighted undirected graph, that connects all the vertices, with the minimum possible total edge weight. If the graph is not connected, a minimum spanning forest is the union of the minimum spanning trees for its connected components.
Author:
Cristian Frăsinaru
  • Method Details

    • getEdges

      EdgeSet getEdges()
      Returns:
      the edges of the minimum spanning tree.
    • getTree

      Graph getTree()
      If the graph is disconnected, this is actually a spanning forest.
      Returns:
      a graph representing the minimum spanning tree.
    • getWeight

      double getWeight()
      Returns:
      the minimum weight of a spanning tree.
    • getInstance

      static MinimumSpanningTreeAlgorithm getInstance(Graph graph)
      Parameters:
      graph - the input graph.
      Returns:
      the default implementation of this interface.