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

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

[Octave-bug-tracker] [bug #35570] Indexing of sparse vectors


From: Jordi Gutiérrez Hermoso
Subject: [Octave-bug-tracker] [bug #35570] Indexing of sparse vectors
Date: Thu, 01 Mar 2012 16:25:23 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20110109 Moongrub/3.6.13

Follow-up Comment #3, bug #35570 (project octave):

I think Marco's patch is essentially correct and I have no idea how whoever
wrote the code that Marco is correcting could have been correct. I always try
to be charitable towards code already in place, and I can't see how anyone
thought the code in place could have been correct.

Basically, in this code path:

   
http://hg.savannah.gnu.org/hgweb/octave/file/c267a3522d6c/liboctave/Sparse.cc#l1402

what *should* happen is that the return matrix should have the data vector
reversed (that part is correct) the row vector reversed but all the indices
have to be recomputed, and the column vector should be copied. These last two
things are completely wrong.

I'm not even sure why this code path exists, though. As far as I can tell,
it's already handled by other paths, and looks like an unnecessarily
aggressive and completely flawed optimisation.

Marco, if you could resubmit your patch without tabs, with a commit message,
and as an hg changeset, that would be grand. Otherwise, I'll do it myself
later.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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