Research Article

Efficient Shared Execution Processing of k-Nearest Neighbor Joins in Road Networks

Algorithm 4

.
Input: : number of inner objects retrieved for an outer object, : outer object, : set of candidate inner objects
Output: : set of inner objects closest to
(1)  // is initialized to the empty set
(2)for each inner object do
(3) // step 1: is computed according to the condition of , see Table 2 for details.
(4)if then
(5)else if then
(6)else if then
(7)else if then
(8)else if then
(9)else if then
(10)else if then
(11) // step 2: is added to if it satisfies either of the following two conditions:
(12)if then
(13)  
(14)else if and then
(15)  
(16)return