Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
aalanwar committed Oct 16, 2022
1 parent 3da6a72 commit e8224fe
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 57 deletions.
60 changes: 6 additions & 54 deletions @logicalZonotope/logicalZonotope.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,74 +26,27 @@
%
% See also: interval, polytope

% Author: Matthias Althoff, Niklas Kochdumper
% Written: 14-September-2006
% Last update: 22-March-2007
% 04-June-2010
% 08-February-2011
% 18-November-2015
% 05-December-2017 (DG) class is redefined in complience with
% the new standard.
% 28-April-2019 code shortened
% 1-May-2020 (NK) new constructor + removed orientation prop.
% Author: Amr Alanwar
% Written: 16-October-2022
% Last update: 16-October-2022
%
% Last revision: ---

%------------- BEGIN CODE --------------

properties (SetAccess = protected, GetAccess = public)
c = [];
G = {};
%c = [];
% contSet = [];
% Z (:,:) {mustBeNumeric} = []; % zonotope center and generator Z = [c,g_1,...,g_p]
% halfspace = []; % halfspace representation of the zonotope
% contSet = [];

end

methods

function Obj = logicalZonotope(varargin)

% % If no argument is passed (default constructor)
% if nargin == 0
% Obj.Z = [];
%
%
% % Generate parent object
% Obj.contSet = contSet();
%
% % If 1 argument is passed
% else
%
% % Generate parent object
% if ~isempty(varargin{1})
% Obj.contSet = contSet(length(varargin{1}(:,1)));
% else
% Obj.contSet = contSet();
% end
%
% if nargin == 1
%
% % input is a zonotope -> copy object
% if isa(varargin{1},'Logicalzonotope')
% Obj = varargin{1};
% else
% % List elements of the class
% Obj.Z = varargin{1};
%
%
% end

% If 2 arguments are passed
% elseif nargin == 2

% List elements of the class
Obj.c = varargin{1};
Obj.G = varargin{2};


% end


end

end
Expand All @@ -102,7 +55,6 @@
methods (Static = true)
%Z = generateRandom(varargin) % generate random zonotope
Z = enclosePoints(points,varargin) % enclose point cloud with zonotope
Z = enclosePoints2(points,varargin) % enclose point cloud with zonotope
Z = encloseMany(Zcell)
end

Expand Down
6 changes: 3 additions & 3 deletions @logicalZonotope/reduce.m
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function Zred = reduce(Z,varargin)
% reduce - Reduces the order of a zonotope
function Zred = reduce(Z)
% reduce - Reduces the number of generators of a logical zonotope
%
% Syntax:
% Zred = reduce(Z,option,order)
% Zred = reduce(Z)
%
% Inputs:
% Z - zonotope object
Expand Down
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ To showcase the utility of logical zonotopes, we illustrate three use cases: (1)
5- Run BoolFunctionExample.m for Example 3 in the paper <br /><br />
<br/>

## Main Support APIs
Z = xor(Z1,Z2): XOR between two logical zontoopes <br />
Z = and(Z1,Z2): AND between two logical zontoopes <br />
Z = or(Z1,Z2): OR between two logical zontoopes <br />
Z = nor(Z1,Z2): NOR between two logical zontoopes <br />
Z = nand(Z1,Z2): NAND between two logical zontoopes <br />
Z = not(Z1): not a logical zontoope <br />
Z = semiKron(Z1,Z2): Semi Tensor Produce between Z1 and Z2 <br />
Flag = Z.containPoints(P): Determines if the point p is inside the logical zonotope Z <br />
Z = enclosePoints(points): Encloses points with a logical zonotope Z <br />
Zred = reduce(Z): Reduces the number of generators of a logical zonotope <br />
<br /><br />


```
Expand Down

0 comments on commit e8224fe

Please sign in to comment.