import cas.Point;

/**
 * Interface definining the idea of a nearest neighbor search.
 * @author Ziv Yaniv 
 */
public interface NearestNeighbor {
    /**
     * Constant denoting the L1 norm.
     */
    public static final int L1 = 0;
    /**
     * Constant denoting the L2 norm.
     */
    public static final int L2 = 1;
    /**
     * Constant denoting the Linfinity norm.
     */
    public static final int Linf = 2;
    
    /**
     * This method is what all Nearest Neighbor algorithms implement.
     * The norm used to compute the nearest neighbor is implementation
     * dependant.
     * @param p Find the nearest point to this point in the data set.
     * @return Returns a <b>reference</b> to the nearest neighbor.
     * @see cas.Point
     */
    public Point find(Point p); 
}

