protected double distanceToHrect ( KDTreeNode node , Instance x ) throws Exception { double distance = 0.0 ; Instance closestPoint = ( Instance ) x . copy ( ) ; boolean inside ; inside = clipToInsideHrect ( node , closestPoint ) ; if ( ! inside ) distance = m_EuclideanDistance . distance ( closestPoint , x ) ; return distance ; }
Returns the distance between a point and an hyperrectangle .