
Sample a uniform random spanning tree
sample_spanning_tree.RdSamples a spanning tree uniformly at random from the set of all spanning trees using Wilson's (1996) loop-erased random walk algorithm.
References
Wilson, D.B. (1996). Generating random spanning trees more quickly than the cover time. Proceedings of the 28th Annual ACM Symposium on Theory of Computing, 296–303. doi:10.1145/237814.237880