Implements the Agglomerative Hierarchical Clustering algorithm.