Cmat2ArcList
function builds the list of arcs of
a graph from a cost matrix that contains the weights of all
the arcs.
Cmat2ArcList(nodes, Cmat, directed = TRUE)
NA
or Inf
means that there is no
arc $ij$.TRUE
) or not (FALSE
).Cmat2ArcList
returns a matrix with the list of arcs
of the graph. Each row represents one arc. The first two
columns contain the two endpoints of each arc and the third
column contains their weights.