These R functions are to perform Kmeans clustering using Mahalanobis distance at each step.