[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #47415] out of memory negating a permutation m
From: |
Carlo de Falco |
Subject: |
[Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix |
Date: |
Sun, 27 Mar 2016 21:32:12 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:45.0) Gecko/20100101 Firefox/45.0 |
Follow-up Comment #27, bug #47415 (project octave):
jwe,
also from the point of view of maintaining compatibility
w.r.t. to -0 and -Inf, the conversion to sparse appears to be more correct in
this case (factorization reorderings) than a conversion to full.
In Matlab 2015b I see the following:
>> A = sprandn (100, 100, .02);
>> [L, U, P, Q, R] = lu (A);
>> 1./(-P(1:2,1:2))
ans =
Inf Inf
Inf Inf
>>
In Octave 4.1 the same code returns
>> A = sprandn (100, 100, .02);
>> [L, U, P, Q, R] = lu (A);
>> 1./(-P(1:2,1:2))
ans =
-Inf -Inf
-Inf -Inf
while the conversion to sparse would lead to the following
>> 1./(-sparse(P(1:2,1:2)))
ans =
Inf Inf
Inf Inf
honestly the idea of using n^2 instead of ~n memory to store
a lot of '-0's sounds a bit exotic to me, if we really cared
so much about -0 we could add a signbit property to SparseMatrix
as well, but is that really worth the effort??
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?47415>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, (continued)
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Rik, 2016/03/23
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, John W. Eaton, 2016/03/23
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Rik, 2016/03/23
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, John W. Eaton, 2016/03/23
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Carlo de Falco, 2016/03/24
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Lachlan Andrew, 2016/03/24
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Carlo de Falco, 2016/03/24
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Rik, 2016/03/24
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Lachlan Andrew, 2016/03/24
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Carlo de Falco, 2016/03/27
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix,
Carlo de Falco <=
- [Octave-bug-tracker] [bug #47415] out of memory negating a permutation matrix, Rik, 2016/03/27