Continuously merge nodes that have the least dissimilarity
Creates an array of clusters where the maximum height is smaller than the threshold
(number)
Array<Cluster>
:
Merge the leaves in the minimum way to have groups
number of clusters.
(number)
Them number of children the first level of the tree should have.
Cluster
:
Returns a list of indices for all the leaves of this cluster. The list is ordered in such a way that a dendrogram could be drawn without crossing branches.
Array<number>
:
Traverses the tree depth-first and calls the provided callback with each individual node
(function)
The callback to be called on each node encounter