-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDominates.m
More file actions
30 lines (25 loc) · 1.21 KB
/
Dominates.m
File metadata and controls
30 lines (25 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% MATLAB Code for %
% %
% Non-dominated Sorting Genetic Algorithm II (NSGA-II) %
% Version 1.0 - April 2010 %
% %
% Programmed By: S. Mostapha Kalami Heris %
% %
% e-Mail: sm.kalami@gmail.com %
% kalami@ee.kntu.ac.ir %
% %
% Homepage: http://www.kalami.ir %
% %
% Dominates.m : performs domination test %
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function b=Dominates(p,q)
if isstruct(p)
p=p.Cost;
end
if isstruct(q)
q=q.Cost;
end
b=(all(p<=q) && any(p<q));
end