bugGNU Octave - Bugs: bug #45080, normest does not work with sparse...

 
 

bug #45080: normest does not work with sparse complex matrices

Submitted by:  Marco Caliari <caliari>
Submitted on:  Tue 12 May 2015 07:19:08 AM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.0.0Operating 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 02 Jun 2015 04:53:22 PM UTC, comment #2:

Retagging release from 4.0.0-rc4 to 4.0.0.

John W. Eaton <jwe>
Project Administrator
Tue 12 May 2015 03:14:09 PM UTC, comment #1:

I think the idea behind using trace() was to have some value that was correlated with the matrix and that was quick to calculate. The problem I see with using just a single value of the matrix (A(1,1)) is that this is likely to be the same value for millions of sparse matrices (it will be 0 since the matrix is sparse and only a few entries are non-zero).

I did a benchmark with

The time, 3 milliseconds, just isn't that significant.

I think the best choice is to convert the single trace value to full. I made that change here (http://hg.savannah.gnu.org/hgweb/octave/rev/cc5ffacb15ab).

Rik <rik5>
Project Administrator
Tue 12 May 2015 07:19:08 AM UTC, original submission:

Dear all,

if A is sparse complex you get the following

The problem is in the line

As a simple fix, it is enough to replace trace(A) with full(trace(A)). The state of rand was set in order to get consistent results over multiple runs with the same argument. I'm wondering if it is real necessary to compute the trace of a matrix (it involves some computations, in particular in the sparse case). Would it not enough to use

?

Cheers,

Marco

Marco Caliari <caliari>
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

 

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 (Posted a comment)
  • -unavailable- added by caliari (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 02 Jun 2015 04:53:22 PM UTCjweRelease4.0.0-rc4=>4.0.0
    Tue 12 May 2015 03:14:09 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
      Release3.8.2=>4.0.0-rc4

    Back to the top


    Powered by Savane 3.1-cleanup1