jklustor-all-api-0.0.7-20140619012755 (ChemAxon)


com.chemaxon.clustering.common
Interface HierarchicCluster<T>

Type Parameters:
T - Type of elements contained by the clusters
All Superinterfaces:
Cluster<T>
All Known Subinterfaces:
IDBasedHierarchicCluster

@Beta
public interface HierarchicCluster<T>
extends Cluster<T>

Represents a group (cluster) of structures, possibly divided into further non overlapping clusters.

Further division is also possibly hierarchic. The further division is represented by the child clusters, returned by clusters().

Leaves (elements referenced by this cluster but not by others) are also directly available

The represented group is immutable, so List modification operators are not supported, they throw UnsupportedOperationException upon calling.

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

Author:
Gabor Imre

Method Summary
 List<? extends HierarchicCluster<T>> clusters()
          Access further grouping of the represented elements.
 List<T> leaves()
          Access leaves associated to this node.
 Optional<? extends HierarchicCluster<T>> parent()
          Get parent for non roots.
 
Methods inherited from interface com.chemaxon.clustering.common.Cluster
members, representant
 

Method Detail

clusters

List<? extends HierarchicCluster<T>> clusters()
Access further grouping of the represented elements.

Note that a hierarchic cluster might represent structures without further divisions: it is valid to contain Cluster.members() but not contain clusters().

Returns:
List of child clusters. The returned list is empty when no child clusters contained.

leaves

List<T> leaves()
Access leaves associated to this node.

Leaves returned are part of members of this Cluster (returned by Cluster.members()) but not part of any of the child clusters (returned by clusters().

Note that representant structure Cluster.representant() might be part of the leaves of this cluster or any of its child clusters leaves.

Returns:
List of leaves. The returned list is empty when no leaves associated (all represented nodes are further clustered).

parent

Optional<? extends HierarchicCluster<T>> parent()
Get parent for non roots.

Returns:
Perent cluster for non root clusters.

jklustor-all-api-0.0.7-20140619012755 (ChemAxon)