@CodeReview(reviewer="Kevin R. Dixon", date="2008-07-22", changesNeeded=false, comments="Code generally looks fine.") public class VectorMeanCentroidClusterCreator extends AbstractCloneableSerializable implements IncrementalClusterCreator<CentroidCluster<Vector>,Vector>
VectorMeanCentroidClusterCreator class implements
a cluster creator for centroid clusters where the centroid is the
mean of the vectors that are members of the cluster.| Modifier and Type | Field and Description |
|---|---|
static VectorMeanCentroidClusterCreator |
INSTANCE
An instance of this class since it has no internal data.
|
| Constructor and Description |
|---|
VectorMeanCentroidClusterCreator()
Creates a new instance of VectorMeanCentroidClusterCreator
|
| Modifier and Type | Method and Description |
|---|---|
void |
addClusterMember(CentroidCluster<Vector> cluster,
Vector member)
Adds a member to the given cluster.
|
CentroidCluster<Vector> |
createCluster()
Creates a new, empty cluster.
|
CentroidCluster<Vector> |
createCluster(java.util.Collection<? extends Vector> members)
Create a new cluster from the given members of that cluster.
|
boolean |
removeClusterMember(CentroidCluster<Vector> cluster,
Vector member)
Removes a member from the given cluster.
|
cloneequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclonepublic static final VectorMeanCentroidClusterCreator INSTANCE
public VectorMeanCentroidClusterCreator()
public CentroidCluster<Vector> createCluster()
IncrementalClusterCreatorcreateCluster in interface IncrementalClusterCreator<CentroidCluster<Vector>,Vector>public CentroidCluster<Vector> createCluster(java.util.Collection<? extends Vector> members)
ClusterCreatorcreateCluster in interface ClusterCreator<CentroidCluster<Vector>,Vector>members - The members of the cluster.public void addClusterMember(CentroidCluster<Vector> cluster, Vector member)
IncrementalClusterCreatoraddClusterMember in interface IncrementalClusterCreator<CentroidCluster<Vector>,Vector>cluster - The cluster to add a member to.member - The member to add to the cluster.public boolean removeClusterMember(CentroidCluster<Vector> cluster, Vector member)
IncrementalClusterCreatorremoveClusterMember in interface IncrementalClusterCreator<CentroidCluster<Vector>,Vector>cluster - The cluster to remove the member from.member - The member to remove.