permutationToEdgelist {mcMST} | R Documentation |
Convert permutation to edge list.
Description
Convert permutation to edge list.
Usage
permutationToEdgelist(perm)
Arguments
perm |
[ |
Value
[matrix(2, length(perm))
] Edge list.
See Also
Other transformation functions:
charVecToEdgelist()
,
edgeListToCharVec()
,
nodelistToEdgelist()
,
permutationToCharVec()
,
prueferToCharVec()
,
prueferToEdgeList()
Examples
# first generate a random permutation, e.g., representing
# a roundtrip tour in a graph
perm = sample(1:10)
print(perm)
# now convert into an edge list
permutationToEdgelist(perm)
[Package mcMST version 1.1.1 Index]