@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.
|
clone
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clone
public static final VectorMeanCentroidClusterCreator INSTANCE
public VectorMeanCentroidClusterCreator()
public CentroidCluster<Vector> createCluster()
IncrementalClusterCreator
createCluster
in interface IncrementalClusterCreator<CentroidCluster<Vector>,Vector>
public CentroidCluster<Vector> createCluster(java.util.Collection<? extends Vector> members)
ClusterCreator
createCluster
in interface ClusterCreator<CentroidCluster<Vector>,Vector>
members
- The members of the cluster.public void addClusterMember(CentroidCluster<Vector> cluster, Vector member)
IncrementalClusterCreator
addClusterMember
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)
IncrementalClusterCreator
removeClusterMember
in interface IncrementalClusterCreator<CentroidCluster<Vector>,Vector>
cluster
- The cluster to remove the member from.member
- The member to remove.