maspack.geometry
Interface KDComparator<T>


public interface KDComparator<T>


Method Summary
 int compare(T a, T b, int dim)
          Compares a(dim) to b(dim)
 double distance(T a, T b)
          Computes the distance between a and b for nearest neighbour searches
 double distance(T a, T b, int dim)
          Computes the axis-aligned distance between a and b, ||a(dim)-b(dim)|| for nearest neighbour searches
 

Method Detail

compare

int compare(T a,
            T b,
            int dim)
Compares a(dim) to b(dim)


distance

double distance(T a,
                T b)
Computes the distance between a and b for nearest neighbour searches


distance

double distance(T a,
                T b,
                int dim)
Computes the axis-aligned distance between a and b, ||a(dim)-b(dim)|| for nearest neighbour searches