The Nearest Neighbor Project


This project developed as an offshoot from the original Voronoi project.

In our Centroidal Voronoi Tessellation (CVT) calculations, we have N generators that we repeatedly try to improve. On each step, we hold the generators fixed, and generate N*NS sample points. For each sample point, we need to determine which generator is closest. As we have seen, this process tends to take the greatest amount of time in the computation.

The idea of this project is to find and implement faster ways to compute the nearest neighbor, so that the CVT algorithm will run faster.

Currently, we have two approaches:

The first step is to make some benchmark runs. These will establish how long it takes to solve the kind of problems we're interested in. This will give us a way of determining whether a new algorithm is significantly better than what we have. We'll also need to get a MATLAB function that can report the time, so that we have a good record of how much work was done.

The second step is to determine what algorithms are available, and choose some that are worth implementing. To start with, I suggest you read Jon Bentley's paper, Optimal Expected-Time Algorithms for Closest Point Problems. In this paper, he describes a simple algorithm, using cells, for finding closest points. Read the parts that make sense to you. Then try to sketch how an algorithm would work that would carry out his procedure. If we can get such an algorithm set up, the code would run much faster.

Here are some more places to look for information on this problem. Look for algorithms that are clear and not too complicated, so that we have a hope of setting them up properly.

Another thing to investigate is the Delaunay search routine in MATLAB. The source code for most MATLAB M files can be copied and printed out. Let's get a copy and look at it, and see if we can understand what is going on with this algorithm. ---Unfortunately, we discovered that the source code for DSEARCH is not really available. Most of the code is in a compiled MEX file.

The DSEARCH documentation, in turn, points to the QHULL program. Let's see if we can find out anything there.

Let's try some simplifications of the grid idea in the Bentley paper. Our goal will be to get something out of using a grid, while trying to avoid the complications of the full blown spiral algorithm.

Let's also try to think about how the DSEARCH algorithm might work. How would knowing the Delaunay triangulation help you to rapidly find the nearest neighbor of a point?

Here is a LaTeX Outline for your report.


Last modified on 01 August 2001.