Implements the weighted-linkage clustering strategy. The distance between two clusters is computed as the weighted average of the distances between all inter-cluster element pairs, where each distance is weighted by its associated weight. This strategy is also known as the "weighted pair-group method" (WPGMA).