Distributed and multi-core version of k-means algorithm