Closed GoogleCodeExporter closed 9 years ago
1. If one passes a cell-vector containing t as control bounds, the
corresponding value in constantbounds vector will still be 1. Consider the
following example:
ls = linsys(eye(2),eye(2),{'t','t'}');
The same remains true for noise and disturbance bounds. Is that the correct
behavior?
2. Everywhere in that class binary AND and OR are used instead of their logical
counterparts, should I fix that?
3. Should I replace double with boolean when it's appropriate?
Original comment by ivan.v.menshikov
on 27 Oct 2012 at 11:33
Original comment by ivan.v.menshikov
on 27 Oct 2012 at 11:35
1) This seems to be a bug both in the source and documentation and the latter
doesn't say that U can be a cell-array. So could you please fix that in the
source code and update the documentaiton?
2) Absolutely, use && and || instead of & and | for scalars.
3) Internally - yes, all internal variables should be logical where
appropriate. However, when it comes to the function input and output parameters
- let us just leave them as is for now - we need to keep the backward
compatibility. So if function returns a variable that has double valus 1 and 0
(which you could replace with a logical variable) - don't change that for now.
Original comment by heartofm...@gmail.com
on 28 Oct 2012 at 3:45
Currently, hasdisturbance method of linsys class returns 1 if and only if the
following condition holds (V is the object passed to the linsys constructor):
~(isempty(V)) && ~(iscell(V)) && ~(isa(V, 'double'))
That is, 1 is returned if and only if V is an object of ellipsoid class or V is
a structure describing ellipsoid that depends on time. But there is two more
possibilities for V. If V is a constant or cell vector, hasdisturbance returns
0. What should I do about that?
Original comment by ivan.v.menshikov
on 30 Oct 2012 at 7:03
Good observation, just make it work as it should and write a test. Thanks.
Original comment by heartofm...@gmail.com
on 30 Oct 2012 at 7:30
Should I write a test for display method? It doesn't make much sense to me,
because every tiny change, an extra space, for example, will result in failure.
Original comment by ivan.v.menshikov
on 31 Oct 2012 at 5:35
Just write a simple test like that
resStr=evalc('display(ellObj)');
isOk=~isempty(strfind(resStr,'Center'));
isOk=~isempty(strfind(resStr,'Shape Matrix'))&&isOk;
mlunitext.assert(isOk);
Original comment by heartofm...@gmail.com
on 31 Oct 2012 at 5:40
How do I write a test that succeeds if there were no errors during it's
execution? Is there a method for doing that?
success = true;
try
% ...
catch e
success = false;
end
mlunit.assert_equals(success, true);
Original comment by ivan.v.menshikov
on 31 Oct 2012 at 7:46
Well, you do not need anything special, just call the method. If it crashes -
you get a test error. If not - test passes. A presence of assertions is not
necessary.
Original comment by heartofm...@gmail.com
on 31 Oct 2012 at 7:55
You can start the reintegration process, please strictly follow the procedure
described at
http://code.google.com/p/ellipsoids/wiki/Issues_workflow_and_branching_policy
(bottom of the page).
Original comment by heartofm...@gmail.com
on 31 Oct 2012 at 9:56
Issue is fixed, please delete the branch.
Original comment by heartofm...@gmail.com
on 1 Nov 2012 at 7:08
Original issue reported on code.google.com by
heartofm...@gmail.com
on 19 Oct 2012 at 6:34