octave-maintainers
[Top][All Lists]
Advanced

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

Re: Class related regressions in GNU Octave 4.0


From: Oliver Heimlich
Subject: Re: Class related regressions in GNU Octave 4.0
Date: Sun, 12 Apr 2015 17:15:01 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0

On 12.04.2015 16:58, Mike Miller wrote:
On Sun, Apr 12, 2015 at 15:31:44 +0200, Oliver Heimlich wrote:
I have verified that #44334, #44498, and #43925 all are regressions, which
have been working in 3.8.2 and are broken in 4.0.

Correction: bug #43925 was reported against 3.8.2, is not a regression
from 3.8.2 to 4.0.0.

Yes.

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).

Good question, I don't know the answer. I have not seen any clear
documentation on the intended interaction between these builtin
functions and user-defined classes.

I don't have access to Matlab, but I guess a good next step would be to
put together some minimal @-class examples and get someone to test them
in Matlab to see what it returns from the functions in question.


I don't have access to Matlab either, the attachment contains a minimal @-class example.

Output in octave-3.8.2 (with annotations):
size_ =

   1   1

isvector_ =  1
isscalar_ =  1
isequal_ =  1
size_ =

   3   1

isvector_ =  1
isscalar_ =  1  <<-- bug 43925
isequal_ =  1
size_ =

   3   2

isvector_ = 0
isscalar_ =  1  <<-- bug 43925
isequal_ =  1


Output in octave-4.0 (with annotations):
size_ =

   1   1

isvector_ =  1
isscalar_ =  1
isequal_ =  1
size_ =

   3   1

isvector_ =  1
isscalar_ =  1  <<-- bug 43925
isequal_ = 0    <<-- bug 44434
size_ =

   3   2

isvector_ =  1  <<-- bug 44498
isscalar_ =  1  <<-- bug 43925
isequal_ = 0    <<-- bug 44434

Attachment: bug44498.tar.gz
Description: application/gzip


reply via email to

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