Single-threaded kmeans implementation completed.