On 14.10.2015 12:33, Christopher Morris wrote:
> Hi,
>
> given a set graph_db of graphs, I want to compare the vertices of each graph 
> with the vertices of each other graph from graph_db. Naturally, this results 
> in a  fourfold nested loop. Unfortunately , this is really slow in python.
>
> Is there a way to way to speed up this process. I tried iterating over 
> indices of graph objects instead of graph objects itself, but this doesn't 
> improve performance.

I don't know exactly what kind of comparison you are doing, but if it is
a simple adjacency one, the similarity() function could be used to push
the innermost loop into C++:

    
https://graph-tool.skewed.de/static/doc/topology.html#graph_tool.topology.similarity

Best,
Tiago

-- 
Tiago de Paula Peixoto <[email protected]>

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
graph-tool mailing list
[email protected]
http://lists.skewed.de/mailman/listinfo/graph-tool

Reply via email to