예제 #1
0
        public IPosition NearestNeighbor(IPosition point)
        {
            KD2DPoint pp = new KD2DPoint(point);
            double    dis;
            KD2DPoint np = (KD2DPoint)kdt.NearestNeighbour(pp, out dis);

            return(np);
        }
예제 #2
0
        public IPosition ApproximateNearestNeighbor(IPosition targetPoint)
        {
            KD2DPoint pp = new KD2DPoint(targetPoint);
            double    dis;
            KD2DPoint np = (KD2DPoint)kdt.NearestNeighbour(pp, out dis);

            return(np);
        }
예제 #3
0
 public bool Equals(KD2DPoint obj)
 {
     if (this.X == obj.X && this.Y == obj.Y)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }