Learn R Programming

mcMST (version 1.1.1)

nodelistToEdgelist: Convert sequence of nodes to edge list.

Description

Convert sequence of nodes to edge list.

Usage

nodelistToEdgelist(nodelist)

Value

[matrix] Edge list.

Arguments

nodelist

[integer]
Sequence of nodes.

See Also

Other transformation functions: charVecToEdgelist(), edgeListToCharVec(), permutationToCharVec(), permutationToEdgelist(), prueferToCharVec(), prueferToEdgeList()

Examples

Run this code
# first generate a random permutation, e.g., representing
# a roundtrip tour in a graph
nodelist = sample(1:8)
# now convert into an edge list
nodelistToEdgelist(nodelist)

Run the code above in your browser using DataLab