0001
0002 function [Candidates, Discrepancy] = xReduceOverlap(Candidates, Discrepancy)
0003
0004 N = length(Candidates(1,:)) - 1;
0005
0006
0007 drawnow
0008
0009 a = 1;
0010
0011 for a=1:N,
0012 i = [a:N 1:(a-1)];
0013
0014 [Candidates, Discrepancy] = xExcludeOverlap2(Candidates, Discrepancy, i);
0015
0016
0017
0018 drawnow
0019 end
0020
0021 for a=1:N,
0022 i = [a:-1:1 N:-1:(a+1)];
0023
0024 [Candidates, Discrepancy] = xExcludeOverlap2(Candidates, Discrepancy, i);
0025
0026
0027 drawnow
0028 end
0029
0030 return
0031
0032 while a < 3000,
0033 r = rand(1,N);
0034 [y,i] = sort(r);
0035
0036 [Candidates, Discrepancy] = xExcludeOverlap2(Candidates, Discrepancy, i);
0037
0038 [a size(Candidates)]
0039 drawnow
0040
0041 a = a + 1;
0042 end