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.
        point - point to add
      • getPoints

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

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