com.partnersoft.geometry.xy
Class XyClosestPointFinder
java.lang.Object
com.partnersoft.geometry.xy.XyClosestPointFinder
public class XyClosestPointFinder
- extends java.lang.Object
Data structure and algorithm to handle closest-point matching.
If you need to associate keys with points, just use a HashMap, then
use the results from this to look up your keys. This won't
always work (e.g. if you have multiple keys mapping to the same or equivalent XyPoint), but
it keeps this implementation simple.
Copyright 2008 Partner Software, Inc.
- Version:
- $Id$
- Author:
- Paul Reavis
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XyClosestPointFinder
public XyClosestPointFinder()
XyClosestPointFinder
public XyClosestPointFinder(double maximumDistance)
XyClosestPointFinder
public XyClosestPointFinder(java.util.Collection<XyPoint> points,
double maximumDistance)
getMaximumDistanceSquared
public double getMaximumDistanceSquared()
setMaximumDistanceSquared
public void setMaximumDistanceSquared(double maximumDistanceSquared)
closestPointTo
public XyPoint closestPointTo(XyPoint point)