bugGNU Octave - Bugs: bug #36777, possible typo in CMatrix.h

 
 

bug #36777: possible typo in CMatrix.h

Submitter:  CarnĂ« Draug <carandraug>
Submitted:  Tue 03 Jul 2012 02:41:26 PM UTC
   
 
Category:  Libraries Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  brownalex Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 04 Jul 2012 01:06:26 AM UTC, comment #2: 

I don't think this is a bug.

If you look at dag in Array.cc, you'll see that it can do two different things:

1. extract a diagonal from a matrix.

2. create a matrix with a given diagonal.

So the return type must be a matrix, not a vector.

John W. Eaton <jwe>
Group administrator
Tue 03 Jul 2012 04:57:11 PM UTC, comment #1: 

I would take this up on the Octave-Maintainer's list.  As you say, the issue also affects ordinary double matrices (dMatrix.h) and it might be easier to take up the issue with that fundamental class first.  Incidentally, I just tried changing the prototype in dMatrix.h to ColumnVector and changing the equivalent function in dMatrix.cc to match and Octave doesn't compile.  So, there is some reason why it is Matrix and not ColumnVector.

Rik <rik5>
Group administrator
Tue 03 Jul 2012 02:41:26 PM UTC, original submission:  

Hi

on September last year, the following was reported on the octave-forge forums (which have since been made invisible since no one was following them):

From my understanding of the functions in the header file CMatrix.h, the diag function is meant to extract the diagonal elements of a ComplexMatrix and return them as a
ComplexColumnVector, however, the function has the prototype:


ComplexMatrix diag (octave_idx_type k=0) const;


rather than


ComplexColumnVector diag (octave_idx_type k=0) const;


as it should. The ordinary matrices also have this problem.

Carnë Draug <carandraug>
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 rik5 (Posted a comment)
  • -email is unavailable- added by carandraug (Submitted the item)
  • -email is unavailable- added by carandraug (Sf e-mail from reported)
  •  

    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 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-07-06 rik5 StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2012-07-03 carandraug Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code