kernel kmeans algorithm for clustering
kmeans: use squared distances
refactoring of kmeans implementation