Research Article
Efficient Processing of Moving k-Range Nearest Neighbor Queries in Directed and Dynamic Spatial Networks
Algorithm 2
Determine_skyline_for_
kth_NN (
k,
).
| Input: k: the number of requested NNs, : the set of qualifying objects for a segment | | Output: : the set of distances from q to its kth NN (i.e., ) | | (1) // count keeps the number of objects processed thus far | | (2) // is initialized to 0 for | | (3) for each object do // qualifying objects are handled sequentially | | (4) if then // if the number of objects processed thus far is less than | | (5) // is the th NN thus far | | (6) else | | (7) | | (8) // count increases by 1 whenever an object is processed | | (9) return |
|