genRandomSpanningTree {mcMST} | R Documentation |
Generate a random spanning tree.
Description
Generate a random spanning tree of a graph given the number of nodes of the problem instance.
Usage
genRandomSpanningTree(n, type = "pruefer")
Arguments
n |
[ |
type |
[ |
Value
[integer
| matrix(2, n)
] Return type depends on type
.
Examples
genRandomSpanningTree(10)
genRandomSpanningTree(10, type = "edgelist")
[Package mcMST version 1.1.1 Index]