L
- Type of leavesT
- Type of clusters
Please note that this interface is marked with @Beta annotation, so it can be subject of incompatible changes or removal in later releases.
@Beta @PublicAPI public interface LevelAssigner<L,T extends HierarchicCluster<L>>
Modifier and Type | Method and Description |
---|---|
double |
clusterLevel(T cluster)
Level associated to a hierarchic cluster.
|
Function<T,Double> |
clusterLevelFunction()
CLuster level association.
|
int[] |
getClusterCountsForLevels()
Cluster counts resulted from partitioning at associated distinct cluster levels.
|
double[] |
getDistinctClusterLevels()
Distinct cluster levels represented by this assigner.
|
double |
leafLevel(L leaf)
Level associated to a leaf object.
|
Function<L,Double> |
leafLevelFunction()
Leaf level association.
|
double |
maxLevel()
Maximal level associated.
|
SingleLevelClustering<L,? extends Cluster<L>> |
partition(double clippingLevel)
Create a partition of the associated hierarchic clustering at a specified level.
|
double clusterLevel(T cluster)
cluster
- A cluster from the associated clusteringdouble leafLevel(L leaf)
leaf
- A leafdouble maxLevel()
Function<T,Double> clusterLevelFunction()
Function
delegating clusterLevel(com.chemaxon.clustering.common.HierarchicCluster)
Function<L,Double> leafLevelFunction()
Function
delegating leafLevel(java.lang.Object)
double[] getDistinctClusterLevels()
Please note that levels of singleton clusters (representing exactly one member) will also contribute to the returned array. A level introduced by only singleton clusters wont represent a change in the partitioning.
maxLevel()
in increasing
order.int[] getClusterCountsForLevels()
Partitioning done by partition(double)
changes at distinct, non-singleton cluster levels
(collected by getDistinctClusterLevels()
). The returned array contains cluster counts resulted from
partitioning at the associated level. Partitioning at level closer to the leaves ususally results in greater
partition count.
Please note that the presence of singleton clusters might introduce new distinct levels (also returned by
getDistinctClusterLevels()
at which the partitioning wont change.
SingleLevelClustering<L,? extends Cluster<L>> partition(double clippingLevel)
A partitioning would not cut clusters having exactly the same level. Clusters on the root side of the cut will dropped while ones on the leaf side will be collapsed. Nodes which are leaves in the dropped clusters (regardless of their level) will be considered as singleton clusters.
The partitioning is represented as a SingleLevelClustering
.
clippingLevel
- Level where cut should occur