Is there is any simple way to calculate pairwise distances for K-mean or Gaussian mixture model clustering