|
From: | Colin Macdonald |
Subject: | [Octave-bug-tracker] [bug #44193] whos "elements" count wrong for user-defined class, capacity problem? |
Date: | Thu, 05 Feb 2015 22:56:13 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:35.0) Gecko/20100101 Firefox/35.0 |
URL: <http://savannah.gnu.org/bugs/?44193> Summary: whos "elements" count wrong for user-defined class, capacity problem? Project: GNU Octave Submitted by: cbm Submitted on: Thu 05 Feb 2015 10:56:13 PM GMT 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: Any _______________________________________________________ Details: In this example, the count should be 9 (from the doubles) + 7 (from the user-defined class sym). But instead each sym counts only as 1 and we see 11 displayed. >> whos Variables in the current scope: Attr Name Size Bytes Class ==== ==== ==== ===== ===== A 3x2 240 sym d 3x3 72 double x 1x1 30 sym Total is 11 elements using 342 bytes @mtmiller found this looking at a related bug: https://savannah.gnu.org/bugs/?43096 There is a minimal class that demonstrates this problem in that bug. In that other bug, I said: > The number of elements thing is counted by adding up > the ".capacity" of each varval. So I guess "capacity" > is wrong for simple classes. _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?44193> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |