Skip to content

Commit

Permalink
Issue #42 Enhancement: function isEmpty added
Browse files Browse the repository at this point in the history
  • Loading branch information
alextim27 committed Nov 29, 2015
1 parent 2fa0b7d commit 9a76721
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions products/+elltool/+core/@GenEllipsoid/GenEllipsoid.m
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ function checkIsMe(objArr)
methods
outEllArr = plus(varargin)
outEllArr = minus(varargin)
isPositiveArr = isEmpty(myEllArr)
function isOk=getIsGoodDir(ellObj1,ellObj2,curDirVec)
% Example:
% firstEllObj = elltool.core.GenEllipsoid([10;0], 2*eye(2));
Expand Down
32 changes: 32 additions & 0 deletions products/+elltool/+core/@GenEllipsoid/isEmpty.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
function isPositiveArr = isEmpty(myEllArr)
%
% ISEMPTY - checks if the GenEllipsoid object is empty.
%
% Input:
% regular:
% myEllArr: GenEllipsoid [nDims1,nDims2,...,nDimsN] - array of
% GenEllipsoids.
%
% Output:
% isPositiveArr: logical[nDims1,nDims2,...,nDimsN],
% isPositiveArr(iCount) = true - if GenEllipsoid
% myEllMat(iCount) is empty, false - otherwise.
%
% Example:
% ellObj = elltool.core.GenEllipsoid();
% isempty(ellObj)
%
% ans =
%
% 1
%
% $Author: Alexandr Timchenko <[email protected]>
% $Date: Dec-2015$
% $Copyright: Moscow State University,
% Faculty of Computational Mathematics and Computer Science,
% System Analysis Department 2015 $
%
import elltool.conf.Properties;
import elltool.core.GenEllipsoid;
GenEllipsoid.checkIsMe(myEllArr);
isPositiveArr = dimension(myEllArr)==0;

0 comments on commit 9a76721

Please sign in to comment.