Class: FeldtRuby::CompleteLinkageMetric

Inherits:
ClusterLinkageMetric show all
Defined in:
lib/feldtruby/statistics/clustering.rb

Overview

Complete linkage metric between clusters - distance between furthest members.

Instance Method Summary collapse

Methods included from SetDistance

#pairwise_distances

Methods included from CompositableDistance

#initialize

Instance Method Details

#calc(cluster1, cluster2) ⇒ Object



26
27
28
# File 'lib/feldtruby/statistics/clustering.rb', line 26

def calc(cluster1, cluster2)
  pairwise_distances(cluster1, cluster2, @sub_metric).max
end