Given a graph with an edge property eweight
of positive weights and an edge property eweight_inv
that is the inverse of eweight
, will min_spanning_tree(g, weights=eweight_inv)
return the maximum spanning tree?
I sure hope so! At least if your weights are positive and nonzero.
A more reliable way to obtain the max spanning tree is just to multiply your weights by “-1”.
1 Like