  %
    % p3  0   1   1   1   1
    %
    % p4  1   1   1   0   1   
    %
    % p5  1   1   0   1   1
    
    % In the next iteration (rank = 2) p5 and p2 will be chosen but not p4. 
%==========================================================================
    
    rankedIndiv(dominates) = true;
end


% For the above example, it will take 4 iterations to find exactly 4 pareto
% fronts (with rank = 1, 2, 3, and 4). At the end of the 2nd iteration, the
% matrix will look like this (two fronts found)
    %     p1  p2  p3  p4  p5
    % p1  1   1   1   1   1
    %
    % p2  1   0   1   1   1
    %
    % p3  0   1   1   1   1
    %
    % p4  1   1   1   0   1   
    %
    % p5  1   1   1   1   0

% and, after the 3rd iteration it will look like this (3rd front will be
% found)

    %     p1  p2  p3  p4  p5
    % p1  1   1   1   1   1
    %
    % p2  1   0   1   1   1
    %
    % p3  1   1   0   1   1
    %
    % p4  1   1   1   0   1   
    %
    % p5  1   1   1   1   0

% and after the 4th iteration (last) the