nodelistToEdgelist: Convert sequence of nodes to edge list.

View source: R/transformations.R

nodelistToEdgelistR Documentation

Convert sequence of nodes to edge list.

Description

Convert sequence of nodes to edge list.

Usage

nodelistToEdgelist(nodelist)

Arguments

nodelist

[integer]
Sequence of nodes.

Value

[matrix] Edge list.

See Also

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

Examples

# 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)

jakobbossek/rmoco documentation built on March 21, 2023, 9:09 p.m.