I am using boost
to compute the voronoi diagram of a set of points in 2-D, very straightforward;
std::vector<Point> points;
...
voronoi_diagram<double> vd;
construct_voronoi(points.begin(), points.end(), &vd);
Is there an algorithm to process the resulting polygons such that the query "Which site does a given point belong to?" can be answered in constant time? In other words, in which polygon a given point is located among a set of polygons?
Of course one can calculate and compare the distance of the given point to the existing ones but that would take O(n) time and does not make use of the information encoded in the Voronoi diagram.