Small function to calculate quickly the distance between rows of two matrix.
pairDist(x, y)
x
a matrix
y
A Distance Matrix