Research Article

A Novel Index Method for K Nearest Object Query over Time-Dependent Road Networks

Algorithm 2

kNN-QUERY ().
Input: time-dependent graph , query vertex , departure time and
Output: the nearest neighbor set
1: , ;
2: while    do
3:   DEQUEUE (), ;
4:  foreach    do
5:   foreach    do
6:    ;
7:   foreach    do
8:    if    then
9:     ;
10:    Let be the set including when ;
11:    if    then
12:    ;
13:    if    then
14:     ;
15:     if    then
16:      ENQUEUE;
17:     else
18:      UPDATE;
19: return