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

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

[Octave-bug-tracker] [bug #44316] eq () between two permutation matrices


From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #44316] eq () between two permutation matrices is not element-wise
Date: Fri, 27 Mar 2015 14:27:44 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Firefox/31.0 Iceweasel/31.2.0

Follow-up Comment #2, bug #44316 (project octave):

Jordi:

In http://hg.savannah.gnu.org/hgweb/octave/rev/b646413c3d0e you added
operators !, unary + and -, ==, !=, &, and | for permutation matrices.  For ==
and !=, using the sparse matrix == and != operators instead of mx_el_eq and
mx_el_ne is what is causing the result to be a scalar instead of a matrix.  If
we use the mx_el_eq and mx_el_ne functions the results will be sparse matrices
the way things are defined now.  That's space efficient but causes some other
possible problems.  For example the sparse matrix unary - operator will not
generate -0, so it seems to me that generating sparse matrices should maybe
not happen implicitly.

Should we even have these operators?  If we omit them, the operations will
succeed but they will generate full matrices.  If we define them, then we
should probably also define the corresponding operators for diagonal matrices
in the same way so that we get consistent results for both permutation and
diagonal matrices.

I'm not sure whether the permutation and diagonal matrix types are really
worth the trouble.

If you think this is worth having more discussion about, maybe we should do so
on the maintainers list.

    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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