help-octave
[Top][All Lists]
Advanced

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

Re: Is A\b using a sparse solver if A is sparse?


From: Geordie McBain
Subject: Re: Is A\b using a sparse solver if A is sparse?
Date: Thu, 02 Feb 2006 15:02:56 +1100

2.1.x doesn't have the new sparse implementation; it's only in 2.9.x.
For 2.9, the sparse implementation is in Octave proper rather than
Octave Forge.

There is a debian package for octave2.9.

On Thu, 2006-02-02 at 11:54 +0800, LUK ShunTim wrote:
> David Bateman wrote:
> > LUK ShunTim wrote:
> > 
> >> Hello,
> >>
> >> If A is sparse, will A\b automatically use the sparse variant of the
> >> linear equation solver?
> >>
> >> Regards,
> >> ST
> >> -- 
> >>
> > Yes.. In fact in 2.9.x it uses a polymorphic solver that has a selection
> > tree
> > 
> 
> [snipped]
> 
> Thanks very much.
> 
> I got this rather strange result on octave 2.1.72 + octave-forge in
> debian/sid.
> 
> <diary>
> octave:2> A=sprand(2500,2500,0.03);
> octave:3> b=eye(2500,1);
> octave:4> r=A*b;
> octave:8> fullA=full(A);
> octave:9> tic;A\r;toc
> ans = 19.277
> octave:10> tic;A\r;toc
> ans = 19.073
> octave:11> tic;A\r;toc
> ans = 19.340
> octave:12> tic;fullA\r;toc
> ans = 5.2551
> octave:13> tic;fullA\r;toc
> ans = 5.0916
> octave:14> tic;fullA\r;toc
> ans = 5.1038
> </diary>
> 
> The full version appears to be *faster* than the sparse version (!),
> which seems to be counter-intuitive. What have I missed?
> 
> Regards,
> ST
> --
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------
> 



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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