bugGNU Octave - Bugs: bug #44316, eq () between two permutation...

 
 

bug #44316: eq () between two permutation matrices is not element-wise

Submitted by:  Carnë Draug <carandraug>
Submitted on:  Thu 19 Feb 2015 09:52:16 PM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Tue 24 Nov 2015 12:46:48 AM UTC, comment #7:

Marking as fixed, and closing report. I will re-open the linked bug #34173 which is now valid again.

Rik <rik5>
Project Administrator
Sun 05 Apr 2015 04:30:09 PM UTC, comment #6:

I found it, bug #34173.

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Sun 05 Apr 2015 04:18:53 PM UTC, comment #5:

I regret not being more thorough with my commit messages back then, because I am almost certain that removing the sparse conversions reintroduces some bug I cannot find now. The bug, as I remember it, was that seemingly innocent-looking computations would fill up memory because of the lack of conversion into sparse matrices.

I can't promise that I'll be able to work on this, but I really wish I could. :-(

Jordi Gutiérrez Hermoso <jordigh>
Project Administrator
Wed 01 Apr 2015 08:28:56 PM UTC, comment #4:

I checked in the following changeset to remove the special operators that generated sparse matrices. We may want to do that, but I think we need a more consistent approach that also treats diagonal matrices in a similar way.

http://hg.savannah.gnu.org/hgweb/octave/rev/b66ab1af5a3b

John W. Eaton <jwe>
Project Administrator
Tue 31 Mar 2015 08:56:21 PM UTC, comment #3:

From a marketing perspective, it's nice that Octave has cool features above and beyond Matlab like space-saving diagonal and permutation matrix implementations. However, I also think we need to favor correctness over memory or speed. If the equality operator doesn't work then that's a problem.

Rik <rik5>
Project Administrator
Fri 27 Mar 2015 02:27:44 PM UTC, comment #2:

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.

John W. Eaton <jwe>
Project Administrator
Fri 20 Feb 2015 01:11:34 AM UTC, comment #1:

Confirmed. And it really is just Permutation <-> Permutation matrices. Even Diagonal matrices, which are similar, work.

Rik <rik5>
Project Administrator
Thu 19 Feb 2015 09:52:16 PM UTC, original submission:

If two matrices are of permutation matrix datatype, the equal comparison returns a scalar instead of an element-wise operation.

Example:

instead, it should return a 3x3 matrix. This bug was already present in Octave 3.8. It works properly as soon as one of the arguments is not a permutation matrix.

Carnë Draug <carandraug>
Project Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Digest:
   bug dependencies.

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jordigh (Posted a comment)
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by jwe
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by carandraug (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 24 Nov 2015 12:46:48 AM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Mon 06 Apr 2015 12:20:30 AM UTCrik5Dependencies-=>Depends on bugs #34173
    Wed 01 Apr 2015 08:28:56 PM UTCjweStatusConfirmed=>Ready For Test
    Fri 27 Mar 2015 02:27:44 PM UTCjweCarbon-Copy-=>Added jordigh
    Fri 20 Feb 2015 01:11:34 AM UTCrik5StatusNone=>Confirmed
    Thu 19 Feb 2015 09:52:51 PM UTCcarandraugSummaryeq () between two permutations is not element-wise=>eq () between two permutation matrices is not element-wise

    Back to the top


    Powered by Savane 3.1-cleanup1