An iterative algorithm: k-means