From e8224fe622cada891ffaa9bb4163f07de5a8f013 Mon Sep 17 00:00:00 2001 From: Amr Alanwar Date: Sun, 16 Oct 2022 20:14:01 +0200 Subject: [PATCH] readme --- @logicalZonotope/logicalZonotope.m | 60 +++--------------------------- @logicalZonotope/reduce.m | 6 +-- README.md | 12 ++++++ 3 files changed, 21 insertions(+), 57 deletions(-) diff --git a/@logicalZonotope/logicalZonotope.m b/@logicalZonotope/logicalZonotope.m index ae8daf0..c1afc62 100644 --- a/@logicalZonotope/logicalZonotope.m +++ b/@logicalZonotope/logicalZonotope.m @@ -26,16 +26,10 @@ % % 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 -------------- @@ -43,57 +37,16 @@ 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 @@ -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 diff --git a/@logicalZonotope/reduce.m b/@logicalZonotope/reduce.m index c156f21..6785765 100644 --- a/@logicalZonotope/reduce.m +++ b/@logicalZonotope/reduce.m @@ -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 diff --git a/README.md b/README.md index 45da3f8..20bea44 100644 --- a/README.md +++ b/README.md @@ -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


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

```