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.

  • 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: HierarchicClustering
      Assigner which consider parent-child edges as unit length.
      Specified by:
      unitPathAssigner in interface HierarchicClustering<Integer,IDBasedHierarchicCluster>
      Returns:
      The unit path assigner.
    • getPreferredAssigner

      IDBasedAssigner getPreferredAssigner()
      Description copied from interface: HierarchicClustering
      Preferred 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:
      getPreferredAssigner in interface HierarchicClustering<Integer,IDBasedHierarchicCluster>
      Returns:
      The preferred assigner