Clustering by means of medoids