kmeans algorithim implemented in java