removeMultiArcs: Remove multi-arcs with no minimum cost

Description Usage Arguments Value

View source: R/removeMultiArcs.R


The removeMultiArcs function go through the arcs list of a given graph and check if there are more than one arc between two nodes. If exist more than one, the function keeps one with minimum cost and remove the others.


removeMultiArcs(arcs, directed = TRUE)



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.


logical value indicating whether the graph is directed (TRUE) or not (FALSE).


removeMultiArcs returns a new list of arcs without any of the multi-arcs founded.

optrees documentation built on May 29, 2017, 9:40 p.m.

Search within the optrees package
Search all R packages, documentation and source code