igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [igraph] memory problem


From: Tamas Nepusz
Subject: RE: [igraph] memory problem
Date: Tue, 3 Feb 2009 13:20:56 +0100

> still it is weird. It works for centrality measures and not for the shortest
> paths. Also, since we're talking about a sparse matrix, I wouldn't expect
> the algorithm to get all that memory for all those zeros...
Node centrality measures require O(n) space when n is the number of vertices,
while the shortest path matrix requires O(n^2) space, since in the most
general case there could be a shortest path between every pair of vertices. If
your graph has multiple components, you can decompose it to connected
components and try running the shortest path calculation on the components
separately. If you are interested in shortest paths starting from only a
subset of vertices, you can also supply that subset to shortest.paths to cut
down the memory usage.

-- 
T.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]