Package com.chemaxon.clustering.common
Interface IDBasedHierarchicClustering
- All Superinterfaces:
HierarchicClustering<Integer,IDBasedHierarchicCluster>
@Beta
@PublicApi
public interface IDBasedHierarchicClustering
extends HierarchicClustering<Integer,IDBasedHierarchicCluster>
A Hierarchic clustering over integers, preferably IDs.
Please note that in order to help the implementation of higher level clustering representations represented clusters have associated, unique integer IDs.
Please note that this interface is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.chemaxon.clustering.common.HierarchicClustering
HierarchicClustering.Alignment -
Method Summary
Modifier and TypeMethodDescriptionintgetClusterIndexOf(int leafId) Cluster ID of a leaf.intMaximal ClusterID present in this clustering.intMaximal leaf ID referenced in this clustering.intgetParentClusterIndexOf(int clusterId) Cluster ID of a cluster's parent.Preferred assigner.Assigner which consider parent-child edges as unit length.Methods inherited from interface com.chemaxon.clustering.common.HierarchicClustering
clusterOf, maxHeight, preferredAlignment, roots
-
Method Details
-
getMaxClusterID
int getMaxClusterID()Maximal ClusterID present in this clustering.- Returns:
- Maximal cluster ID present.
-
getMaxLeafID
int getMaxLeafID()Maximal leaf ID referenced in this clustering.- Returns:
- Maximal leaf ID referenced.
-
getClusterIndexOf
int getClusterIndexOf(int leafId) Cluster ID of a leaf.Functionality is similar to
HierarchicClustering.clusterOf(java.lang.Object).- Parameters:
leafId- A leaf- Returns:
- Lowest level Cluster ID or -1 when the leaf is not present in the clustering
-
getParentClusterIndexOf
int getParentClusterIndexOf(int clusterId) Cluster ID of a cluster's parent.- Parameters:
clusterId- A cluster ID- Returns:
- Parent cluster ID or -1 when the specified cluster is a root or when the specified cluster is not contained
-
unitPathAssigner
IDBasedAssigner unitPathAssigner()Description copied from interface:HierarchicClusteringAssigner which consider parent-child edges as unit length.- Specified by:
unitPathAssignerin interfaceHierarchicClustering<Integer,IDBasedHierarchicCluster> - Returns:
- The unit path assigner.
-
getPreferredAssigner
IDBasedAssigner getPreferredAssigner()Description copied from interface:HierarchicClusteringPreferred assigner.Some clustering algorithms may assign meaningful levels for clusters/leaves. If no such assignment s done the implementations should fall back the unit path assigner.
- Specified by:
getPreferredAssignerin interfaceHierarchicClustering<Integer,IDBasedHierarchicCluster> - Returns:
- The preferred assigner
-