Package com.chemaxon.clustering.common
Interface HierarchicClustering<T,C extends HierarchicCluster<T>>
-
- Type Parameters:
C
- Type of clusters representedT
- Type of items contained by the clustersPlease 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
HierarchicClustering.Alignment
Level interpretation.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.google.common.base.Optional<C>
clusterOf(T item)
Identify the lowest level cluster containing the given item.LevelAssigner<T,C>
getPreferredAssigner()
Preferred assigner.int
maxHeight()
Maximal height of the clustering.HierarchicClustering.Alignment
preferredAlignment()
Preferred alignment of the represented clustering.List<C>
roots()
Highest level cluster(s).LevelAssigner<T,C>
unitPathAssigner()
Assigner which consider parent-child edges as unit length.
-
-
-
Method Detail
-
roots
List<C> roots()
Highest level cluster(s).- Returns:
- List of highest level clusters. The returned list contains at least one element.
-
clusterOf
com.google.common.base.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()
ofroots()
-
-