bugGNU Octave - Bugs: bug #36932, linear indexing assignment removes...

 
 

bug #36932: linear indexing assignment removes Diagonal property from matrix

Submitted by:  Rik <rik5>
Submitted on:  Mon Jul 23 20:35:13 2012  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedAssigned to: Jordi GutiĆ©rrez Hermoso <jordigh>
Originator Name: Open/Closed: Closed
Release: devOperating System: GNU/Linux

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Tue Nov 17 05:29:15 2015, comment #2:

This is 3.5 years old, but I just fixed it with this changeset (http://hg.savannah.gnu.org/hgweb/octave/rev/cd1bd06974d8). Closing report.

Rik <rik5>
Project Administrator
Mon Jul 23 22:09:25 2012, comment #1:

The complex->real thing seems to be a red herring. The problem is the linear indexing:

The offending code is here:

http://hg.savannah.gnu.org/hgweb/octave/file/74c7265c057a/src/ov-base-diag.cc#l118

As you can see, it's checking for indexing of type a(i,i) to preserve diagonality, but it's not checking any other possible indexing types that could make sense (e.g. a(i,i,1) or a(i) where i = n^2).

I think I can handle this problem myself.

Jordi GutiƩrrez Hermoso <jordigh>
Project AdministratorIn charge of this item.
Mon Jul 23 20:35:13 2012, original submission:

As a result of narrowing, the Diagonal property of a matrix is lost and the result is cast to a full matrix which unnecessarily increases storage requirements.

Example code:

Rik <rik5>
Project Administrator

 

(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 jordigh (Posted a comment)
  • -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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Nov 17 05:29:15 2015rik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Mon Jul 23 22:10:12 2012jordighSummarylinear indexing assignment Diagonal property from matrix=>linear indexing assignment removes Diagonal property from matrix
    Mon Jul 23 22:09:59 2012jordighStatusNone=>Confirmed
      Assigned toNone=>jordigh
      SummaryAutomatic complex->real narrowing removes Diagonal property from matrix=>linear indexing assignment Diagonal property from matrix

    Back to the top


    Powered by Savane 3.1-cleanup