bugGNU Octave - Bugs: bug #32011, Tweak : sparse matrix should...

 
 

bug #32011: Tweak : sparse matrix should report 100% when full rather than 1e02%

Submitted by:  Rik <rik5>
Submitted on:  Thu 30 Dec 2010 05:27:50 PM UTC  
 
Category: NoneSeverity: 1 - Wish
Priority: 5 - NormalItem Group: Feature Request
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Tue 04 Jan 2011 10:01:25 PM UTC, comment #3:

I checked in the following change:

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

It avoids printing 100% except for completely full matrices and allows printing up to 99.99% full (saturates there for anything greater but not 100%).

John W. Eaton <jwe>
Project Administrator
Tue 04 Jan 2011 08:34:39 PM UTC, comment #2:

This patch has the slight disadvantage that it reports nearly empty matrices as empty. Under the old system:

With your patch it reports these examples as 0%. Of course, the current code has the opposite trouble. Anything above 99.5% is reported as 1e02%. I suppose this is preferable because sparse matrices should generally be empty rather than full.

What about keeping the existing code, but using an explicit test for 100% full? This isn't performance critical code since it is only for output to a user who is millions of times slower than the computer.

I'm thinking of 3 cases.

1) Matrix is not full and density is less than 99.5%.
Use existing code.

2) Matrix is not full, but density is greater than 99.5%
Report 99.5% full. This avoids the round-off error which
would make this 100% if printed normally. At a glance
one can see that the matrix is very dense, but not full.

3) Matrix is full. All elements are non-zero
Report 100%.

Rik <rik5>
Project Administrator
Thu 30 Dec 2010 06:58:00 PM UTC, comment #1:

Here's a simple patch.

(file #22325)

Judd Storrs <judd>
Thu 30 Dec 2010 05:27:50 PM UTC, original submission:

This is a small niggle, but when sparse matrices report their density they usually use the form XX%. However, if the matrix has all of its entries as non-zero, it reports 1e02% rather than 100%.

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #22325:  bug32011.patch added by judd (1KiB - text/x-patch)

 

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 judd (Updated the item)
  • -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 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 04 Jan 2011 10:01:25 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Thu 30 Dec 2010 06:58:00 PM UTCjuddAttached File-=>Added bug32011.patch, #22325

    Back to the top


    Powered by Savane 3.1-cleanup1