octave-maintainers
[Top][All Lists]
Advanced

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

Re: About diagonal matrices


From: Jaroslav Hajek
Subject: Re: About diagonal matrices
Date: Sun, 22 Feb 2009 10:32:29 +0100

On Sat, Feb 21, 2009 at 11:57 PM, Daniel J Sebald
<address@hidden> wrote:
> Søren Hauberg wrote:
>
>> couldn't the diagonal matrix class be extended to have a variable that
>> holds the value of the non-diagonal elements of the matrix? Usually this
>> would be zero, but when the matrix is multiplied with NaN or divided
>> with zero, this value would change.
>
> That is what I meant by "default sparse value", or value V0 in the set of
>
> Omega-(IJ1+IJ2+IJ3+...+IJN) -> V0
>
> i.e., the most prevalent value in the matrix.
>
> Dan
>
>

Yes, this will fix some memory issues, but make the sparse operations
significantly more complicated, and slower.
Instead of an assumed zero, you have a numerical value as the default
multiplier. That means pre-multiplying each vector by this value. And
that's just the sparse * vector. sparse * sparse will be a real fun, I
guess.
Not speaking of the fact that this will probably involve non-trivial
modifications of almost all sparse matrix operations.

-- 
RNDr. Jaroslav Hajek
computing expert
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz



reply via email to

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