Skip to main content
. 2018 Oct 22;18(10):3581. doi: 10.3390/s18103581
Algorithm 1 KNNBP.
Input:FD = F1,F2,F3,,Fn
    Fj = (MAj1,Rj1),(MAj2,Rj2),,(MAjm,Rjm) (Fj FD)
    Fc = (ma1,r1),(ma2,r2),,(mam,rm)
1: forj = 1 to n do
2: for i = 1 to m do
3:   if mai = MAji then
4:    if |riRji| < V then
5:      Pi = 1 − |riRji|V
6:    end if
7:   end if
8: end for
9:    Pj = 1ai=1api
10: end for
11:  sort Pj from largest to smallest
12:  select the first K positions (xk,yk) corresponding to Pj
13:  calculate position (x, y) = 1Kj=1K(xj,yj)
14:  return (x, y)