add generic kmeans in src