Skip to main content
. 2015 Jan 22;15(2):2369–2387. doi: 10.3390/s150202369
% For each cell in an image
for Vp ∈ p
  % Copy previous state
  lpt+1=lpt;
  θpt+1=θpt;
  % Neighbors try to attack current cell
  for Vq ∈ N(p)
   if g(‖C⇀p−C⇀q‖2)⋅θqt>θpt
    lpt+1=lpt
    θpt+1=g(‖C⇀p−C⇀q‖2)⋅θqt
   end if
  end for
end for