6 Nov
2009
6 Nov
'09
2 p.m.
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