treeAlgs

Tree Algorithms

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.