In section we described how to update the results on receiving data point updates and we discussed handling the updates of queries in section . Now we describe how to deal with data point and query point updates simultaneously at each time stamp. Our update handling module consists of two phases.
receive updates: First we receive the query point updates and then we handle data point updates. For each query update, if , we delete and insert a new query in system. Otherwise, we mark the query as moving and calculate for every NN of and temporarily set as ( ).
After handling query updates, we receive point updates. For each query affected by a point update, we insert (delete) in (from) if it is an incoming (outgoing) update. Only the order of is changed in case of internal update.
update results: We update the results of all affected queries in this phase. The new queries are updated by calling initial computation module described in Algorithm . The affected queries that were not moved are handled as described in section . The queries marked as moving are updated by first setting the equal to the distance of data point in (set as if ). The update algorithm is similar to initial kNN algorithm and the radius of first round is . During computation, the data points that are already in are ignored. Clearly, the cells with are also skipped as all the data points in these cells belong to . The algorithm terminates when the next cell to be accessed has .
Algorithm summarizes the complete update handling module.
Muhammad Aamir Cheema 2007-10-11