User:Carandraug: Difference between revisions

Jump to navigation Jump to search
1,291 bytes added ,  29 November 2013
→‎Octave to do list: implement cell array of types as input for isa
(→‎octave-forge to do: port FIESTA)
(→‎Octave to do list: implement cell array of types as input for isa)
Line 92: Line 92:


== wiki to do list ==
== wiki to do list ==
* make "isa" work for cell arrays. At the moment it kinda works but seems to do so by accident (adding a thing such as "numeric" in the array will not work). Also, since this function may be used a lot, and the core of it is already in C++, we might as well implement the very small part written in .m in the oct function. This change will make validateattributes (patch #8249) simpler as well.
<pre>
<carandraug> I would like to patch isa to do accept a cell array. It already does it (but I think it does so accidentally and weird things happen when numeric is in the cell array)
<carandraug> jwe, no. I mean to use "isa (obj, {"type1", "type2", "type3"})"
<carandraug> this kinda works already. But fails if for example one of the types is "numeric", or "float" which should be expanded. I think because the way input checking is done which uses "if (strcmp ())" instead of "if (any (strcmpi()))"
<jwe> meaning the same as  isa (obj, "type1") || isa (obj, "type2"), ...
<jwe> I guess that would make sense.
<carandraug> jwe, exactly. The thing is: should that return a scalar boolean or a a boolean array for each possible match?
<carandraug> i'd be inclined to return a boolean array
<jwe> That seems most flexible.  You can always do "any (isa (...))"ay is an object by itself.
</pre>


== octave code to write ==
== octave code to write ==

Navigation menu