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 23 Jul 2012 08:35:13 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: ConfirmedAssigned to: Jordi GutiĆ©rrez Hermoso <jordigh>
Originator Name: Open/Closed: Open
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.

 

Mon 23 Jul 2012 10:09:25 PM UTC, 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 23 Jul 2012 08:35:13 PM UTC, 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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 23 Jul 2012 10:10:12 PM UTCjordighSummarylinear indexing assignment Diagonal property from matrix=>linear indexing assignment removes Diagonal property from matrix
    Mon 23 Jul 2012 10:09:59 PM UTCjordighStatusNone=>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