Research Article

Partition Selection for Large-Scale Data Management Using KNN Join Processing

Algorithm 2

Nearest center point selecting.
Input: S,
Output: <s, >//the partitions corresponding to the k nearest center points of
foreachdo
 tmp = TreeMap(); //create a TreeMap object tmp
 nearPointSet = [ ]; //create an empty set nearPointSet
foreachdo//insert the distance and index information tmp.put(dis(p, s), p.index);
for i = 0 to k do//read the first k center points’ information nearPointSet.append(tmp.next()); //put the information to nearPointSet