A k-means clustering algorithm