[graph-tool] Re: Fetch all the edges between given two vertices

2022-03-09 Thread Snehal Shekatkar

Wow! Didn't know this. Thanks so much for the quick reply.

On 09/03/22 18:06, Tiago de Paula Peixoto wrote:

Am 09.03.22 um 12:50 schrieb Snehal Shekatkar:
Both these operations, especially the first one, is expensive. Also, 
`g.edge(u,v)` seems to return only one edge without any information 
about which one it is. How can I solve this problem?


Just call: g.edge(u, v, all_edges=True)



--
Snehal M. Shekatkar
https://inferred.in
PGP key -> https://inferred.in/snehal_pub_key.txt


OpenPGP_0x1CC7AB23F89CAACF.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature
___
graph-tool mailing list -- graph-tool@skewed.de
To unsubscribe send an email to graph-tool-le...@skewed.de


[graph-tool] Re: Fetch all the edges between given two vertices

2022-03-09 Thread Tiago de Paula Peixoto

Am 09.03.22 um 12:50 schrieb Snehal Shekatkar:
Both these operations, especially the first one, is expensive. Also, 
`g.edge(u,v)` seems to return only one edge without any information 
about which one it is. How can I solve this problem?


Just call: g.edge(u, v, all_edges=True)

--
Tiago de Paula Peixoto 
___
graph-tool mailing list -- graph-tool@skewed.de
To unsubscribe send an email to graph-tool-le...@skewed.de


[graph-tool] Fetch all the edges between given two vertices

2022-03-09 Thread Snehal Shekatkar

Dear all,

I am analyzing a multigraph and I would like to fetch all the edges 
between given two vertices during runtime. I haven't been able to figure 
out an easy way to do this. For now, there are two possible ways:


1. Iterate over all the edges and catch the ones which connect vertices 
u and v

2. Go through all the neighbours of u and find out all the occurrences of v

Both these operations, especially the first one, is expensive. Also, 
`g.edge(u,v)` seems to return only one edge without any information 
about which one it is. How can I solve this problem?


Best regards,
SMS
--
Snehal M. Shekatkar
https://inferred.in
PGP key -> https://inferred.in/snehal_pub_key.txt


OpenPGP_0x1CC7AB23F89CAACF.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature
___
graph-tool mailing list -- graph-tool@skewed.de
To unsubscribe send an email to graph-tool-le...@skewed.de