[SciPy-User] solving large sparse linear system with Laplacian matrix

Emmanuelle Gouillart emmanuelle.gouillart@normalesup....
Fri Oct 30 10:36:22 CDT 2009


	Hello, 

	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
and bicg.

	Thanks a lot for your help, (and more later)

	Emmanuelle

> I don't know about memory consumption but I think
> scipy.sparse.linalg.factorized(A)
> should be more efficient if you need to solve for several right hand sides.

> Josef


> > For those curious about the background, I'm trying to implement Grady's
> > random walker algorithm [1] 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

> > [1] 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
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user


More information about the SciPy-User mailing list