struct

HClust::Dendrogram::Step

Inherits Struct < Value < Object

A single merge step in a dendrogram.

A step corresponds to a merge between two distinct clusters. By convention, the indexes of the merged clusters (#nodes) are always sorted.

Constructors

new(c_i : Int32, c_j : Int32, distance : Float64)

Creates a new Step between the clusters c_i and c_j with the given distance.

NOTE: Cluster indexes are stored sorted.

Source

Instance methods

==(rhs : self) : Bool

Returns true if the step are equal, else false.

NOTE: Distances are compared within numeric precision (epsilon = 1e-15).

Source
clusters

Indexes of the merged clusters. An index can range from 0 to N + N - 1, where N is the number of original elements or observations and an index equals to or greater than N indicates a newly created cluster (refer to the Dendrogram documentation).

Source
distance

Distance between the merged clusters. This is computed according to the selected linkage rule (see Rule) used for the clustering. If both merge clusters have a single element (singleton), the distance is equal to the pairwise distance between the elements.

Source
sqrt

Returns a Step with the square root of the distance.

Source