octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #51950] sparse qr may return a malformed spars


From: Rik
Subject: [Octave-bug-tracker] [bug #51950] sparse qr may return a malformed sparse matrix R with out of bounds entries
Date: Wed, 6 Sep 2017 18:50:16 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0

Follow-up Comment #8, bug #51950 (project octave):

I tested some old versions of Octave with Marco's test case and the problem
exists all the way back to Octave 3.2.4, and probably before that as well but
I don't have any earlier versions.

The code is in liboctave/numeric/sparse-qr.[h|cc].  This doesn't appear to be
a problem with the full version which is in liboctave/numeric/qr.[h|cc].

I tried the full version


A=zeros(5,6);A(3,1)=0.8;A(2,2)=1.4;A(1,6)=-0.5;[q r]=qr(A);r
r =

  -0.80000   0.00000   0.00000   0.00000   0.00000   0.00000
   0.00000   1.40000   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.50000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000


The difference is element (3,6) which is missing in the sparse version


A=sparse(5,6);A(3,1)=0.8;A(2,2)=1.4;A(1,6)=-0.5;[q r]=qr(A);r
r =

Compressed Column Sparse (rows = 5, cols = 6, nnz = 3 [10%])

  (1, 1) -> -0.80000
  (2, 2) -> -1.4000
  (6, 6) ->  0.50000

full (r)
ans =

  -0.80000   0.00000   0.00000   0.00000   0.00000   0.00000
   0.00000  -1.40000   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000
   0.00000   0.00000   0.00000   0.00000   0.00000   0.00000




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51950>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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