Skip to main content

minimum_spanning_forest

Function minimum_spanning_forest 

Source
pub fn minimum_spanning_forest<T>(
    graph: &CompressedSparseData2<T>,
) -> Result<CompressedSparseData2<T>, MethodsErrors>
Expand description

Minimum spanning forest of a CSR adjacency.

§Params

  • graph - Square CSR adjacency, read as undirected. Self loops and NaN weights are skipped; infinities are ordinary weights.

§Returns

A symmetric CSR of the same shape holding the retained edges at their original weights, or an error when graph is not a structurally sound square CSR.