yes, it's a small world of over 1.000.000 edges, at the moment, but probably will be bigger in the future. I don't understand how i could switch it to O(E) from the matrix. Can i get the non-zero elements of the matrix? On Fri, Nov 6, 2009 at 3:00 PM, Tiago de Paula Peixoto <tiago@forked.de> wrote:
Claudio Martella wrote:
Thanks, that is a solution i considered but it feels very expensive. This means a continuous switch from python to C++, doesn't it? Wouldn't it be way faster if i created such a function somewhere in C++, passing the matrix?
That depends. You can improve that loop if your matrix is sparse (which probably is), so that you build the graph in O(E) time. However, the important question is what are you going to be doing with the matrix. If you spend 90% of the time doing computations with it, it would not matter much if the last step is carried out in python.
Cheers, Tiago
_______________________________________________ graph-tool mailing list graph-tool@forked.de http://lists.forked.de/mailman/listinfo/graph-tool
-- Claudio Martella claudio.martella@gmail.com