get.edge.ids(graph, vp, directed = TRUE, error = FALSE, multi = FALSE)
FALSE
, then no error is reported,
and zero is returned for the non-existant edge(s).FALSE
, and a pair of vertices are given twice
(or more), then always the same edge id is reported back for
them. If TRUE
, then the edge ids of multiple edgerror
argument is
FALSE
.)This function allows finding the edges of the graph, via their incident vertices.
g <- graph.ring(10)
ei <- get.edge.ids(g, c(1,2, 4,5))
E(g)[ei]
## non-existant edge
get.edge.ids(g, c(2,1, 1,4, 5,4))
Run the code above in your browser using DataLab