[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: |
David Bateman |
Subject: |
Re: Is A\b using a sparse solver if A is sparse? |
Date: |
Thu, 02 Feb 2006 09:43:31 +0100 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20040923) |
Dmitri A. Sergatskov wrote:
LUK ShunTim wrote:
...
> octave2.9:11> tic;A\r;toc
> ans = 12.117
> octave2.9:12> tic;fullA\r;toc
> ans = 6.6568
I just like to note a couple things:
-- The result of A\r is a full matrix
this remains the case even if
b=speye (2500,1); r=A*b;
and hence r becomes also a sparse.
I am not sure if this conversion to a full
matrix is a bug or a feature.
Its a feature as "sparse * full" is generally full, octave assumes it is
full so that it doesn't have to a full matrix at the end with the
required memory overhead that implies..
-- On my computer the difference is about 20%
not a factor of 2. Do you have and use ATLAS?
octave:1> A=sprand(2500,2500,0.03);
octave:2> b=speye (2500,1);
octave:3> r=A*b;
octave:4> tic;C=A\r;toc
ans = 5.0834
octave:5> fullA=full(A);
octave:6> tic;D=fullA\r;toc
ans = 4.0818
See my previous message about LU factorizations of random sparse matrices...
D.
--
David Bateman address@hidden
Motorola Labs - Paris +33 1 69 35 48 04 (Ph)
Parc Les Algorithmes, Commune de St Aubin +33 6 72 01 06 33 (Mob)
91193 Gif-Sur-Yvette FRANCE +33 1 69 35 77 01 (Fax)
The information contained in this communication has been classified as:
[x] General Business Information
[ ] Motorola Internal Use Only
[ ] Motorola Confidential Proprietary
-------------------------------------------------------------
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
-------------------------------------------------------------
Re: Is A\b using a sparse solver if A is sparse?, David Bateman, 2006/02/02