Algorithm
Development Kit 1.0

algs.model.problems.nearestNeighbor
Class BruteForceNearestNeighbor

java.lang.Object
  extended by algs.model.problems.nearestNeighbor.BruteForceNearestNeighbor

public class BruteForceNearestNeighbor
extends java.lang.Object

Brute Force implementation of Nearest Neighbor Query.

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Constructor Summary
BruteForceNearestNeighbor(IMultiPoint[] points)
          Store all points to compute nearest neighbor queries.
 
Method Summary
 IMultiPoint nearest(IMultiPoint x)
          Return the closest point to x within the input set P.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BruteForceNearestNeighbor

public BruteForceNearestNeighbor(IMultiPoint[] points)
Store all points to compute nearest neighbor queries.

Parameters:
points - points forming the input set P.
Method Detail

nearest

public IMultiPoint nearest(IMultiPoint x)
Return the closest point to x within the input set P.

Parameters:
x - search point.

Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.