Research Article
Semantic-Aware Top-k Multirequest Optimal Route
Algorithm 2
FindNN(,C,x).
| Input: Vertex , collection of POIs with service in C, integer . | |
| Output: The -th nearest neighbor of in C. | |
| 1 | |
| 2 ; | |
| 3 if then | |
| 4 for in C | |
| 5 | |
| 6 ; | |
| 7 N.add(v′,average); | |
| 8 else | |
| 9 for v′ in C | |
| 10 average = | |
| 11 N.add(v′,average); | |
| 12 N.ascending(average); | |
| 13 if then | |
| 14 return ; |