acomplete k-means main function