Skip to content

Commit

Permalink
Issue #42 Enhancement: function isbigger added
Browse files Browse the repository at this point in the history
  • Loading branch information
alextim27 committed Dec 7, 2015
1 parent 0334b60 commit 4aefb64
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions products/+elltool/+core/@GenEllipsoid/isbigger.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
function isPositive = isbigger(fstEll, secEll)
%
% ISBIGGER - checks if one GenEllipsoid would contain the other if their
% centers would coincide.
%
% isPositive = ISBIGGER(fstEll, secEll) - Given two single GenEllipsoids
% of the same dimension, fstEll and secEll, check if fstEll
% would contain secEll inside if they were both
% centered at origin.
%
% Input:
% regular:
% fstEll: ellipsoid [1, 1] - first GenEllipsoid.
% secEll: ellipsoid [1, 1] - second GenEllipsoid
% of the same dimention.
%
% Output:
% isPositive: logical[1, 1], true - if GenEllipsoid fstEll
% would contain secEll inside, false - otherwise.
%
% $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.core.GenEllipsoid;
nDimSpace=length(diag(ellObj1.diagMat));
isPositive = checkBigger(fstEll, secEll, nDimSpace);

0 comments on commit 4aefb64

Please sign in to comment.