I'm working with AI and one of my algorithms needs to work adding and removing edges. I can do it with igraph, but my problem is: It's too slow.
If I work with two dictionaries, I can run my code in 0.2s. But with igraph, I take more than 5s. And I don't know how to improve the code performance.
The code below is a part of algorithm. This remove all edges between two lists of vertex. Anyone knows how to do this with better performance?
for vertexI in self.vertexSI:
for vertexJ in self.vertexSJ:
try:
nOfLoops += 1
edgeID = self.g.get_eid(vertexI.index, vertexJ.index)
self.g.delete_edges(edgeID)
except Exception as e:
nOfErrors += 1
Thanks.