Class Cluster<T extends Clusterable>

    • Constructor Detail

      • Cluster

        public Cluster()
        Build a cluster centered at a specified point.
    • Method Detail

      • addPoint

        public void addPoint​(T point)
        Add a point to this cluster.
        Parameters:
        point - point to add
      • getPoints

        public List<TgetPoints()
        Get the points contained in the cluster.
        Returns:
        points contained in the cluster
      • centroid

        public Clusterable centroid()
        Computes the centroid of the cluster.
        Returns:
        the centroid for the cluster, or null if the cluster does not contain any points.