Algorithm 1.
Clustering between N fibers with M affinities and nC unconnected elements.
function Clustering elements, affinities |
for i := 1 to N - nC do |
Find the highest affinity between a pair of elements and use it as a new node of the dendrogram |
Remove the affinity between the selected pair of elements |
Merge the clusters associated to each of the elements |
Update the affinities using the average-linkage criterion |
end for |
return dendrogram |
end function |