Interface HierarchicClustering<T,C extends HierarchicCluster<T>>

Type Parameters:
C - Type of clusters represented
T - Type of items contained by the clusters

Please note that this interface is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.

All Known Subinterfaces:
IDBasedHierarchicClustering

@Beta @PublicAPI public interface HierarchicClustering<T,C extends HierarchicCluster<T>>
A grouping of structures into disjunct hierarchical groups.

Instances of this interface represent unbalanced multifurcating trees.

  • Method Details

    • roots

      List<C> roots()
      Highest level cluster(s).
      Returns:
      List of highest level clusters. The returned list contains at least one element.
    • clusterOf

      Optional<C> clusterOf(T item)
      Identify the lowest level cluster containing the given item.
      Parameters:
      item - Item to look up.
      Returns:
      The lowest level cluster containing the given element. This cluster contains the given item as a leaf.
    • preferredAlignment

      HierarchicClustering.Alignment preferredAlignment()
      Preferred alignment of the represented clustering.
      Returns:
      Preferred alignment
    • unitPathAssigner

      LevelAssigner<T,C> unitPathAssigner()
      Assigner which consider parent-child edges as unit length.
      Returns:
      The unit path assigner.
    • getPreferredAssigner

      LevelAssigner<T,C> getPreferredAssigner()
      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.

      Returns:
      The preferred assigner
    • maxHeight

      int maxHeight()
      Maximal height of the clustering.
      Returns:
      Maximum of HierarchicCluster.height() of roots()