bugGNU Octave - Bugs: bug #33932, Permutation matrices of class...

 
 

bug #33932: Permutation matrices of class 'single' are unsupported

Submitter:  Rik <rik5>
Submitted:  Wed 03 Aug 2011 02:18:04 AM UTC
   
 
Category:  Libraries Severity:  2 - Minor
Priority:  1 - Later Item Group:  Matlab Compatibility
Status:  None Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 28 Aug 2017 08:17:27 PM UTC, comment #4: 

Can anyone with access to Matlab verify the class of P?  If not, we can post on Octave-Maintainer's list.  Sample code:


[L,U,P] = lu (single (magic (4)));
class (P)


Also, even if they do return a single matrix, do we care enough to fix this?  Memory isn't a concern.  The LU decomposition results in


L * U = P * A


If A is single, L and U will be single, and a double matrix P multiplied by a single matrix A will result in an object of class single.



Rik <rik5>
Group administrator
Mon 28 Aug 2017 06:03:31 PM UTC, comment #3: 

I think this is still a compatibility issue as I suspect Matlab creates a single precision array for P in


[l, u, p] = (single (a))


John W. Eaton <jwe>
Group administrator
Sat 26 Aug 2017 05:22:42 AM UTC, comment #2: 

I don't think we need to change anything.  Permutation matrices are already very space efficient so there is no real memory issue with storing the indices as double values rather single values.  I can't find the original code in ov-re-mat.cc so it has probably been removed.  Closing report.

Rik <rik5>
Group administrator
Sat 19 Nov 2016 03:18:37 PM UTC, comment #1: 

This behavior is still present in Octave 4.2.0.

Hartmut <hardy>
Wed 03 Aug 2011 02:18:04 AM UTC, original submission:  

This is a placeholder issue report.  During the first code sprint it was found that permutation matrices can only be created of class double.  This might not be a problem, however, we found C++ code for the double() function (src/ov-re-mat.cc) that was checking for permutation matrices of type single.

Example Code:


x = eye(2)([2,1], :)
x =

Permutation Matrix

   0   1
   1   0

BUT

x = eye(2, "single")([2,1], :)
x =

   0   1
   1   0



Rik <rik5>
Group administrator

 

(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 hardy (Posted a comment)
  • -email is unavailable- added by mtmiller (Updated the item)
  • -email is unavailable- added by rik5 (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-08-28 jwe Item GroupOther Matlab Compatibility
        StatusWont Fix None
    2017-08-26 rik5 StatusConfirmed Wont Fix
        Open/ClosedOpen Closed
    2014-01-19 mtmiller CategoryNone Libraries
        Operating SystemGNU/Linux Any
    2012-06-08 rik5 Priority2 1 - Later
    2011-09-25 rik5 Priority5 - Normal 2

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code