Sequential and parallel implementations of Lloyd's algorithm for k-means clustering.