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

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

[Octave-bug-tracker] [bug #46912] qr not working as described


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #46912] qr not working as described
Date: Wed, 20 Jan 2016 17:01:42 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.2.1

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

It looks to me like


[q, r, p] = qr (a)


is equivalent to


[q, r, p] = qr (a, 'matrix')


and that


[q, r, p] = qr (a, 'vector')


just returns p in a vector form such that instead of writing


a * p == q * r


you can write


a(:,p) == q * r


So I don't think that any knowledge of the Fortran libraries is really needed
to implement these features.  It's just a matter of accepting 'matrix' as the
default and, for the 'vector' argument, transforming the permutation matrix to
a vector of indices.  I believe that's equivalent to writing


find (p) - (0:rows(p):numel(p)-1)'


though I'm sure there's a better way of expressing that in C++ when using the
permutation matrix class.  I think it is just the col_perm_vec method in the
PermMatrix class.


    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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