Tree Algorithms
Laplacians.comp_stretches
— Method.Compute the stretched of every edge in mat
with respect to the tree tree
. Returns the answer as a sparse matrix with the same nonzero structure as mat
. Assumes that mat
is symmetric. tree
should be the adjacency matrix of a spanning tree.