Skip to main content
. 2019 Feb 19;19(4):867. doi: 10.3390/s19040867
Algorithm 1: An algorithm for the swimming method.
1:Input: snnum, Ns, Nc, Nre, Ned, Ped.
2:Output: New value of the ϑi(j+1,k,l) after swimming movement.
3: counter=0; /*for computing swim length*/
4:  while counter<Ns do /*for not exceeding the maximum number of swim steps */
5:     counter=counter+1;
6:     if J(i,j+1,k,l)<Jprevious then /* a more advantageous direction*/
7:         Jprevious=J(i,j+1,k,l);
8:         ϑi(j+1,k,l)=ϑi(j+1,k,l)+C(i)Δ(i)Δm(i)Δ(i)
9:     end if
10:  end while
11: return ϑi(j+1,k,l)