calculate the square distance between a, b
sqdist_R(a, b)
a
a matrix with D \times N dimension
b
a numeric value for the different between a and b