octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #36932] Automatic complex->real narrowing remo


From: Rik
Subject: [Octave-bug-tracker] [bug #36932] Automatic complex->real narrowing removes Diagonal property from matrix
Date: Mon, 23 Jul 2012 20:35:13 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1

URL:
  <http://savannah.gnu.org/bugs/?36932>

                 Summary: Automatic complex->real narrowing removes Diagonal
property from matrix
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Mon 23 Jul 2012 01:35:13 PM PDT
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

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:


a = diag ([1+i 2 3])
a =

Diagonal Matrix

   1 + 1i        0        0
        0   2 + 0i        0
        0        0   3 + 0i

octave:8> whos a
Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  ===== 
   c    a           3x3                         48  double

Total is 9 elements using 48 bytes

a(1) = 1
a =

   1   0   0
   0   2   0
   0   0   3

octave:12> whos a
Variables in the current scope:

   Attr Name        Size                     Bytes  Class
   ==== ====        ====                     =====  ===== 
        a           3x3                         72  double

Total is 9 elements using 72 bytes






    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?36932>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]