all_minimum_spanning_trees

Function all_minimum_spanning_trees 

Source
pub fn all_minimum_spanning_trees<T, S>(
    graph: &S,
    algorithm: &str,
) -> SparseResult<(CsrArray<T>, bool, T)>
where T: Float + Debug + Copy + 'static, S: SparseArray<T>,
Expand description

Find all minimum spanning trees of a graph

§Note

This is a computationally expensive operation for large graphs. It returns one MST and indicates if multiple MSTs exist.

§Arguments

  • graph - The graph as a sparse matrix
  • algorithm - MST algorithm to use

§Returns

A tuple containing:

  • One minimum spanning tree
  • Boolean indicating if multiple MSTs exist
  • Total weight of any MST