Contains distance function implementations for the Hierarchical Clustering node.