bugGNU Octave - Bugs: bug #33601, Sparse bool matrices lose logical...

 
 

bug #33601: Sparse bool matrices lose logical class with assignment of 1

Submitted by:  Rik <rik5>
Submitted on:  Mon 20 Jun 2011 01:40:05 AM UTC  
 
Category: LibrariesSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Mon 20 Jun 2011 05:29:53 PM UTC, comment #2:

Why not add the tests to the list for the upcoming code sprint which is dedicated to improving test coverage? Hopefully, we will have some extra able bodies to assist in writing the new tests. But as a first step, go ahead and add it to the task tracker so it doesn't get lost.

Rik <rik5>
Project Administrator
Mon 20 Jun 2011 03:19:03 PM UTC, comment #1:

I checked in the following changeset:

http://hg.savannah.gnu.org/hgweb/octave/rev/824c60c8f7b9

I also checked in the following related changeset, for assignment of [], '', or "" to delete elements from sparse logical arrays:

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

It would be great if there were some new tests added for these operations. I'm not sure whether there are any tests for the double and complex cases yet. If there are, then the new tests should probably be added in a way that is consistent with the dobule/complex tests. Otherwise, I'd suggest a new section in the build_sparse_tests.sh script. Maybe I should just add this to the task tracker so we don't forget?

John W. Eaton <jwe>
Project Administrator
Mon 20 Jun 2011 01:40:05 AM UTC, original submission:

Sparse matrices support an underlying type of class double or class logical. The double class normally takes 8 bytes to store while the logical class only takes 1 byte so it is advantageous to use sparse logical matrices where possible.

Unfortunately, assignment of 0 or 1 will promote a sparse logical matrix to a sparse double matrix even though it is unnecessary and even though the equivalent operation using full matrices would not cause such a promotion.

Some example code:

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by rik5 (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 20 Jun 2011 03:19:03 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup