Represents clusters in the graph and the dendrogram as computed by HierarchicalClustering.
Remarks
Type Details
- yfiles module
- view-layout-bridge
- yfiles-umd modules
- view-layout-bridge
- Legacy UMD name
- yfiles.analysis.HierarchicalClusteringResult
See Also
Properties
Gets a collection of all clusters in the graph.
See Also
Gets the root of the dendrogram which is used internally to generate the clusters.
Remarks
Initially each node comprises its own cluster. At each step of the clustering algorithm two clusters are merged together until all nodes belong to the same cluster. The tree which is generated this way is stored as dendrogram. The dendrogram's leaves thus represent clusters that each contain a single node. The dendrogram's root represents a cluster that contains every node of the graph.
The actual clusters can be calculated for a cluster count using changeClusterCount or for a cut-off value using changeCutoff.
The dendrogram's root can be null
if the original graph was empty.
See Also
Gets a mapping from each node to its cluster ID.
Remarks
-1
.Gets a mapping from each node to its cluster.
Methods
Creates a new HierarchicalClusteringResult with the given numbers of clusters.
Parameters
A map of options to pass to the method.
- clusterCount - number
- The cluster count. Must be positive; if it's greater than the number of nodes in the graph, the number of clusters in the result is equal to the number of nodes.
Returns
- ↪HierarchicalClusteringResult
- A new HierarchicalClusteringResult with the same dendrogramRoot and clusters calculated based on that dendrogram and the
clusterCount
.
See Also
Creates a new HierarchicalClusteringResult with clusters based on the given cutoff value.
Parameters
A map of options to pass to the method.
- cutoff - number
- The cutoff value for the clusters' dissimilarity.
Returns
- ↪HierarchicalClusteringResult
- A new HierarchicalClusteringResult with the same dendrogramRoot and clusters calculated based on that dendrogram and
cutoff
.
See Also
Gets the representative of node
in the dendrogram.
Remarks
The representative of node
is one of the dendrogram's leaves which represents the cluster that only contains the node
.
If a subgraph is specified this method returns null
if node
is not part of the subgraph.