[SciPy-User] Matrix-free version of connected_components
Charles R Harris
Thu Aug 2 07:46:41 CDT 2012
On Thu, Aug 2, 2012 at 6:15 AM, Per Nielsen <email@example.com> wrote:
> I have looked into the functions provided by the networkX package,
> however, as far as I have been able to understand both networkX and scipy
> employ similar methods for finding the connected components. Thus I still
> need the full sparse matrix (or graph which I think is similar in memory
> usage) in memory, which I would like to avoid.
> Thank you for your reply and the reference.
I'm not sure what your application is, but if you just need connected
components and have an easy way to find neighbors, then unionfind will
partition the set for you. Although the common version doesn't make it easy
to extract them, I have an implementation that keeps the connected nodes in
a circular list for just that application.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-User