I am working on the generation of some random graph model in which probability of having an edge between two given vertices is some complicated function. Hence I cannot use in-built models to generate this graph. Thus, I am using nested for loops to generate it. However, this makes the code extremely slow. Is it possible to iterate over all the pairs of vertices efficiently in graph-tool so that there would be sufficient increase in the speed?