Home | History | Annotate | Download | only in clustering

Lines Matching defs:points

31  * @param <T> type of the points to cluster
44 /** Split the cluster with largest number of points. */
86 * @param points the points to cluster
90 * @return a list of clusters containing the points
92 public List<Cluster<T>> cluster(final Collection<T> points,
95 List<Cluster<T>> clusters = chooseInitialCenters(points, k, random);
96 assignPointsToClusters(clusters, points);
131 assignPointsToClusters(newClusters, points);
138 * Adds the given points to the closest {@link Cluster}.
140 * @param <T> type of the points to cluster
141 * @param clusters the {@link Cluster}s to add the points to
142 * @param points the points to add to the given {@link Cluster}s
145 assignPointsToClusters(final Collection<Cluster<T>> clusters, final Collection<T> points) {
146 for (final T p : points) {
155 * @param <T> type of the points to cluster
156 * @param points the points to choose the initial centers from
162 chooseInitialCenters(final Collection<T> points, final int k, final Random random) {
164 final List<T> pointSet = new ArrayList<T>(points);
167 // Choose one center uniformly at random from among the data points.
242 * Get a random point from the {@link Cluster} with the largest number of points
253 // get the number of points of the current cluster
256 // select the cluster with the largest number of points
290 final List<T> points = cluster.getPoints();
291 for (int i = 0; i < points.size(); ++i) {
292 final double distance = points.get(i).distanceFrom(center);
314 * @param <T> type of the points to cluster