|
From: | Julien Bect |
Subject: | Re: Class related regressions in GNU Octave 4.0 |
Date: | Sun, 12 Apr 2015 17:10:17 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
Le 12/04/2015 15:31, Oliver Heimlich a écrit :
What is the desired behaviour?1) A user-defined class must override all methods together to get a consistent behaviour: size, isvector, isscalar, and isequal. Any builtin functions will assume that the object's size is always [1 1]. 2) A user-defined class must override size only. The builtin functions will respect the overriden size method and produce a consistent behaviour for the user (like they did in version 3.8.2).
I expect that, if I define size(x) for my objects, then isvector and isscalar should behave properly.
This is what Matlab does for isscalar, as reported in bug report #43925 (I haven't checked isvector, but I would bet that it behaves similarly).
[Prev in Thread] | Current Thread | [Next in Thread] |