ClusterType
- The type of data stored in the cluster.@CodeReview(reviewer="Kevin R. Dixon", date="2008-07-22", changesNeeded=false, comments="Code generally looks fine.") public class CentroidCluster<ClusterType> extends DefaultCluster<ClusterType>
Modifier and Type | Field and Description |
---|---|
protected ClusterType |
centroid
The center of the cluster.
|
DEFAULT_INDEX
Constructor and Description |
---|
CentroidCluster()
Creates a new instance of CentroidCluster.
|
CentroidCluster(ClusterType centroid)
Creates a new instance of CentroidCluster.
|
CentroidCluster(ClusterType centroid,
java.util.Collection<? extends ClusterType> members)
Creates a new instance of CentroidCluster.
|
CentroidCluster(int index,
ClusterType centroid)
Creates a new instance of CentroidCluster.
|
CentroidCluster(int index,
ClusterType centroid,
java.util.Collection<? extends ClusterType> members)
Creates a new instance of CentroidCluster.
|
Modifier and Type | Method and Description |
---|---|
ClusterType |
getCentroid()
Gets the centroid of the cluster.
|
void |
setCentroid(ClusterType centroid)
Sets the centroid of the cluster.
|
clone, getIndex, getMembers, setIndex
protected ClusterType centroid
public CentroidCluster()
public CentroidCluster(ClusterType centroid)
centroid
- The centroid of the cluster.public CentroidCluster(int index, ClusterType centroid)
index
- The index of the cluster.centroid
- The centroid of the cluster.public CentroidCluster(ClusterType centroid, java.util.Collection<? extends ClusterType> members)
centroid
- The centroid of the cluster.members
- The members of the cluster.public CentroidCluster(int index, ClusterType centroid, java.util.Collection<? extends ClusterType> members)
index
- The index of the cluster.centroid
- The centroid of the cluster.members
- The members of the cluster.public ClusterType getCentroid()
public void setCentroid(ClusterType centroid)
centroid
- The centroid of the cluster.