Other applications of Lloyd's algorithm include smoothing of triangle meshes in the finite element method. Bisecting K-Means. It happens neither in the constructor nor in the Voronoi call. For 1-dimensional data, there are polynomial time algorithms. The KMeans algorithm clusters data by trying to separate samples in n groups of equal variance, minimizing a criterion known as the inertia or within-cluster sum-of-squares see below.
nest...