org.apache.commons.math.stat.clustering
T
- the type of points that can be clusteredpublic class Cluster<T extends Clusterable<T>> extends java.lang.Object implements java.io.Serializable
Clusterable
points.Modifier and Type | Field and Description |
---|---|
private T |
center
Center of the cluster.
|
private java.util.List<T> |
points
The points contained in this cluster.
|
private static long |
serialVersionUID
Serializable version identifier.
|
Constructor and Description |
---|
Cluster(T center)
Build a cluster centered at a specified point.
|
private static final long serialVersionUID
private final java.util.List<T extends Clusterable<T>> points
private final T extends Clusterable<T> center
public Cluster(T center)
center
- the point which is to be the center of this clusterpublic void addPoint(T point)
point
- point to addpublic java.util.List<T> getPoints()
public T getCenter()
Copyright (c) 2003-2013 Apache Software Foundation