bugGNU Octave - Bugs: bug #37565, size_equal gives false positives...

 
 

bug #37565: size_equal gives false positives for user-defined classes

Submitted by:  Lukas Reichlin <paramaniac>
Submitted on:  Sat 13 Oct 2012 06:16:10 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: Need InfoAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.3Operating System: Mac OS

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 18 Oct 2012 04:24:33 PM UTC, comment #5:

Nice, and the problem is solved!

Rik <rik5>
Project Administrator
Thu 18 Oct 2012 04:20:21 PM UTC, comment #4:

OK, I've just committed this highly sophisticated solution ;-)

http://sourceforge.net/p/octave/code/11303/tree/trunk/octave-forge/main/control/inst/%40lti/size_equal.m

Lukas Reichlin <paramaniac>
Thu 18 Oct 2012 03:40:05 AM UTC, comment #3:

I think the problem is that you have an overload for the size() function, but not for the size_equal function. The size_equal function is written in C++ and is looking at the dimension vector for the object. This is not the same thing as calling the size() function on an object.

For example, with your inputs from the control package.

It might be possible to call the overloaded size function from within C++, but I think it will be easier and faster for you to just overload size_equal in the @lti class.

Rik <rik5>
Project Administrator
Sun 14 Oct 2012 04:52:51 PM UTC, comment #2:
Lukas Reichlin <paramaniac>
Sun 14 Oct 2012 03:49:30 PM UTC, comment #1:

In your example, could you also post what Octave returned for the variables sa, sb, and sc?

Rik <rik5>
Project Administrator
Sat 13 Oct 2012 06:16:10 PM UTC, original submission:

size_equal gives false positives for user-defined classes, e.g. LTI class from the control package:

The arguments a, b, c have different sizes, but size_equal returns true, which is wrong.

Lukas Reichlin <paramaniac>

 

(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 rik5 (Posted a comment)
  • -unavailable- added by paramaniac (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 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 18 Oct 2012 04:24:33 PM UTCrik5Open/ClosedOpen=>Closed
    Sun 14 Oct 2012 03:49:30 PM UTCrik5StatusNone=>Need Info

    Back to the top


    Powered by Savane 3.1-cleanup1