A sweep algorithm and its implementation: The all-nearest-neighbors problem revisited
The 2-dimensional all-nearest-neighbors problem is solved directly in asymptotically optimal time O(n*log n) using a simple plane-sweep algorithm. We present the algorithm, its analysis, an optimization based on the concept of a clipped computation, and describe two robust realizations: a "foolproof" implementation which guarantees an exact result at the cost of using five-fold-precision rational arithmetic, and a robust floating point version.
KeywordsComputational geometry complexity proximity problems plane-sweep algorithms robust implementation
Unable to display preview. Download preview PDF.
- [Be 84]G. B. Beretta: An implementation of a plane-sweep algorithm on a personal computer, Ph. D. Thesis Nr. 7538, ETH Zurich, 1984.Google Scholar
- [Fo 86]S. Fortune: A Sweepline Algorithm for Voronoi Diagrams, Proc. 2nd Ann. Symp. on Computational Geometry, ACM, 313–322, 1986.Google Scholar
- [SH 75]M. Shamos, D. Hoey: Closest-Point Problems, 16th Annual IEEE Symposium on Foundations of Computer Science, 151–162 (1975).Google Scholar
- [SH 76]M. Shamos, D. Hoey: Geometric intersection problems, 17th Annual IEEE Symposium on Foundations of Computer Science, 208–215 (1976).Google Scholar
- [Va 86]P. Vaidya: An Optimal Algorithm for the All-Nearest-Neighbors Problem, Proc. 27th IEEE Symp. Foundations of Computer Science, 117–122, 1986.Google Scholar