Nested loop over graph objects.

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.

Best regards
Christopher

attachment.html (747 Bytes)

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