bugGNU Octave - Bugs: bug #36104, determinant of a sparse zero matrix

 
 

bug #36104: determinant of a sparse zero matrix

Submitter:  Marco Caliari <caliari>
Submitted:  Thu 05 Apr 2012 07:39:42 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  dbateman
Originator Name:  Open/Closed:  * Closed
Release:  * 3.6.0 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 21 May 2012 11:29:41 AM UTC, comment #3: 
John W. Eaton <jwe>
Group administrator
Sat 19 May 2012 12:01:37 AM UTC, comment #2: 

This could be considered a bug in UMFPACK from my point of view, though it did point out another problem in the sparse constructor. The issue is that if the index vectors for empty then the sparse constrctor creates ridx and data indices that are 0 as they should be used. Apparently UMFPACK checks that these indices have valid values before doing any calculation even though they shouldn't be used.

However, if we define nzmax we should have valid ridx and data indicies and as the constructor stands we don't. So the easiest fix is just to ensure that ridx and data are valid in all cases.

See the changeset 8d2ce821e38a

D.

David Bateman <dbateman>
Group Member
Thu 05 Apr 2012 08:52:10 PM UTC, comment #1: 

Confirmed on a recent tip.  There seems to be a problem in the sparse() call when some dimensions are null ([]) rather than explicitly zero.


det (sparse ([], [], 1, 1, 1, 1))
error: det: SparseMatrix::determinant symbolic factorization failed


Rik <rik5>
Group administrator
Thu 05 Apr 2012 07:39:42 PM UTC, original submission:  

Dear all,

I found the following:


A=sparse(0);
B=sparse(zeros(0,1),zeros(0,1),1,1,1);
A==B
ans = Compressed Column Sparse (rows = 1, cols = 1, nnz = 1 [100%])

  (1, 1) ->  1
det(A)
ans = 0
det(B)
error: det: SparseMatrix::determinant symbolic factorization failed


So, A e B are equal, but it is not possible to compute the determinant of B. The definition of B is weird, I know, but it is precisely what you get from


B = sprand(1,1,0);


This bug is present at least since 3.0.5. By the way, in Matlab A and B coincides and have the same zero determinant.

Marco

Marco Caliari <caliari>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by dbateman (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by caliari (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-05-19 dbateman StatusConfirmed Fixed
        Assigned toNone dbateman
        Open/ClosedOpen Closed
    2012-04-05 rik5 StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-02a9.
    Corresponding source code