Interface Cluster<T>

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

@Beta @PublicApi public interface Cluster<T>
Cluster represents a group of structures.

An instance of Cluster is considered a List of represented/referenced (nonnegative) structure IDs.

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.

  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Represented member count of this cluster.
    Represented members of this cluster.
    Cluster representant member.
  • Method Details

    • members

      List<T> members()
      Represented members of this cluster.

      For a single level clustering members are defined that the leave structures associated to that cluster. Hierarchical clusters are considered as a cluster which is divided further by sub clusters (children). Some of the members of a hierarchical cluster is associated to those children, while some are not. Those members which are not contained by the child clusters are referred as immediate leaves.

      Please note that members list in case of a hierarchic clustering might be constructed on-the-fly as the union of the immediate leaves and the members of the child clusters. To get member count access memberCount() which is expected to execute efficiently.

      Returns:
      Immutable, non empty list of represented cluster members
    • memberCount

      int memberCount()
      Represented member count of this cluster.

      Delegates List.size() of members().

      Returns:
      Member count.
    • representant

      T representant()
      Cluster representant member.

      Please note that some clustering implementations might designate cluster representants arbitrarily without further considerations.

      Returns:
      An item from members() list designated as cluster representant.