To handle update of query , the straight forward way is to delete its results and all of its related information (e.g., remove from the influence lists of related cells), and then issue a new query on location and compute it from scratch. Clearly, this update computation does not utilize the previous computed information. Let ( ) be the distance of NN from when at ( ). The NN results of at location and share nothing if and only if . Without loss of generality, we assume dataset follows uniform distribution. Consequently, . Note that for other distributions, the similar formula can be derived by density functions. Therefore, in order to maximize sharing previous computed results, we delete the previous query and issue a new query only when query point moves farther than .
Handling single query update is described as follows.
Case 1: . Query and its NN result are discarded first. Then, we remove from the influence lists of cells which lie in the rectangle containing the circle with center at and radius as . After that, a new continuous NN query is issued on .
Case 2: . We first calculate for every NN of and update as the maximum of them. i.e., . Then, recompute NN for in the similar way to the initial NN computation. The first circle's radius is . During computation, the data points in are skipped as they have been computed already. Clearly, the cells with are also skipped as all data points in these cells belong to .
Muhammad Aamir Cheema 2007-10-11