Mercurial > hg > ltpda
comparison m-toolbox/classes/@ltpda_obj/ne.m @ 0:f0afece42f48
Import.
author | Daniele Nicolodi <nicolodi@science.unitn.it> |
---|---|
date | Wed, 23 Nov 2011 19:22:13 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f0afece42f48 |
---|---|
1 % NE overloads the ~= operator for ltpda objects. | |
2 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
3 % | |
4 % DESCRIPTION: NE overloads the ~= operator for ltpda objects. | |
5 % | |
6 % CALL: result = ne(obj1,obj2) | |
7 % result = ne(obj1,obj2, exc_list) | |
8 % result = ne(obj1,obj2, 'property1', 'property2') | |
9 % result = ne(obj1,obj2, 'class/property', 'class/property') | |
10 % result = ne(obj1,obj2, plist('Exceptions', 'exception-list')) | |
11 % | |
12 % PLIST: key: 'Exceptions' | |
13 % value: String or cell-array with exceptions. | |
14 % | |
15 % EXAMPLES: result = ne(obj1,obj2, 'name', 'created') | |
16 % result = ne(obj1,obj2, 'ao/name') | |
17 % | |
18 % INPUTS: obj1,obj2 - input objects | |
19 % exc_list - exception list | |
20 % List of properties which are not checked. | |
21 % | |
22 % OUTPUTS: If the two objects are considered equal, result == false, | |
23 % otherwise, result == true. | |
24 % | |
25 % <a href="matlab:utils.helper.displayMethodInfo('ltpda_obj', 'ne')">Parameters Description</a> | |
26 % | |
27 % VERSION: $Id: ne.m,v 1.13 2011/04/08 08:56:37 hewitson Exp $ | |
28 % | |
29 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
30 | |
31 function result = ne(obj1, obj2, varargin) | |
32 | |
33 % Check if this is a call for parameters | |
34 hh = {obj1, obj2, varargin{:}}; | |
35 if utils.helper.isinfocall(hh{:}) | |
36 result = getInfo(varargin{1}); | |
37 return | |
38 end | |
39 | |
40 if eq(obj1, obj2, varargin{:}) | |
41 result = false; | |
42 else | |
43 result = true; | |
44 end | |
45 end | |
46 | |
47 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
48 % Local Functions % | |
49 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
50 | |
51 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
52 % | |
53 % FUNCTION: getInfo | |
54 % | |
55 % DESCRIPTION: Get Info Object | |
56 % | |
57 % HISTORY: 11-07-07 M Hewitson | |
58 % Creation. | |
59 % | |
60 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
61 | |
62 function ii = getInfo(varargin) | |
63 if nargin == 1 && strcmpi(varargin{1}, 'None') | |
64 sets = {}; | |
65 pl = []; | |
66 else | |
67 sets = {'Default'}; | |
68 pl = getDefaultPlist; | |
69 end | |
70 % Build info object | |
71 ii = minfo(mfilename, 'ltpda_obj', 'ltpda', utils.const.categories.relop, '$Id: ne.m,v 1.13 2011/04/08 08:56:37 hewitson Exp $', sets, pl); | |
72 ii.setModifier(false); | |
73 ii.setArgsmin(2); | |
74 end | |
75 | |
76 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
77 % | |
78 % FUNCTION: getDefaultPlist | |
79 % | |
80 % DESCRIPTION: Get Default Plist | |
81 % | |
82 % HISTORY: 11-07-07 M Hewitson | |
83 % Creation. | |
84 % | |
85 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
86 | |
87 function plout = getDefaultPlist() | |
88 persistent pl; | |
89 if exist('pl', 'var')==0 || isempty(pl) | |
90 pl = buildplist(); | |
91 end | |
92 plout = pl; | |
93 end | |
94 | |
95 function pl = buildplist() | |
96 pl = plist.EMPTY_PLIST; | |
97 end | |
98 |