> I am trying to get all edges between two vertices in a multigraph using 
> E(g,P) but I get only one edge. Could you please help me retrieve the ids of 
> all multiple edges?
> 
> 
> Here is an example:
> g = graph.ring(3)
> g = add.edges(g, c(0,1)) #make into a multigraph
> E(g, P=c(0,1)) #outputs only one edge and not two (0,1) edges!

Try this:

as.vector(E(g)[0 %--% 1])

If your graph is directed and you are interested in the edges in one direction 
only:

as.vector(E(g)[0 %->% 1])

Best,
T.


_______________________________________________
igraph-help mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/igraph-help

Reply via email to