[SciPy-User] solving large sparse linear system with Laplacian matrix
Fri Oct 30 10:36:22 CDT 2009
thank you very much for all your answers!
Josef, the scipy.sparse.linalg.factorized(A) tip works like a
charm for solving efficiently for all right hand sides -- and the memory
requirement is comparable to scipy.sparse.linalg.spsolve, so I guess the
factorized matrices are not very dense... I can solve my system with
N=10^6 in a few tens of seconds, which is really cool!
For more speed and memory improvements, it will take me some time
to benchmark all the proposed solutions, so I shall report later on the
solution that works best for me. Joachim Dahl mentioned off-list that the
cvxopt package wraps Lapack's gbsv routine for banded matrices, which
might also be an option (and it also wraps other functions mentioned by
David such as ptsv). I will first try scipy's solutions such as lgmres
Thanks a lot for your help, (and more later)
> I don't know about memory consumption but I think
> should be more efficient if you need to solve for several right hand sides.
> > For those curious about the background, I'm trying to implement Grady's
> > random walker algorithm  to segment large 3-D X-ray tomography images.
> > N=l**3 is the number of voxels in the cubic image, and M is the number of
> > regions which I would like to segment. I don't require a very good
> > precision on the elements of the solution X.
> > Thanks in advance,
> > Emmanuelle
> >  L. Grady, "Random walks for image segmentation", IEEE Trans. on
> > pattern analysis and machine intelligence, Vol. 28, p. 1768, 2006.
> > _______________________________________________
> > SciPy-User mailing list
> > SciPy-User@scipy.org
> > http://mail.scipy.org/mailman/listinfo/scipy-user
> SciPy-User mailing list
More information about the SciPy-User