In k-means clustering we are given a set of n data points in d-dimensional space and an integer k, and the problem is to determine a set of k points in d-space, called centers, so as to minimize the mean squared distance from each data point to its neares
"small" pieces of geometric software available on the Internet. Most of the software is available free of charge. Unless otherwise specified, C or C++ source code is available for all programs.