gov.sandia.cognition.learning.algorithm.clustering.cluster
Interface IncrementalClusterCreator<ClusterType extends Cluster<DataType>,DataType>

Type Parameters:
ClusterType - The type of Cluster created by this object.
DataType - The data type from which to create a new cluster.
All Superinterfaces:
Cloneable, CloneableSerializable, ClusterCreator<ClusterType,DataType>, Serializable
All Known Implementing Classes:
DefaultIncrementalClusterCreator, VectorMeanCentroidClusterCreator

public interface IncrementalClusterCreator<ClusterType extends Cluster<DataType>,DataType>
extends ClusterCreator<ClusterType,DataType>

An interface for a ClusterCreator that can incrementally add and remove members from a cluster.

Since:
3.1.1
Author:
Justin Basilico

Method Summary
 void addClusterMember(ClusterType cluster, DataType member)
          Adds a member to the given cluster.
 ClusterType createCluster()
          Creates a new, empty cluster.
 boolean removeClusterMember(ClusterType cluster, DataType member)
          Removes a member from the given cluster.
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.clustering.cluster.ClusterCreator
createCluster
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Method Detail

createCluster

ClusterType createCluster()
Creates a new, empty cluster.

Returns:
A new, empty cluster.

addClusterMember

void addClusterMember(ClusterType cluster,
                      DataType member)
Adds a member to the given cluster.

Parameters:
cluster - The cluster to add a member to.
member - The member to add to the cluster.

removeClusterMember

boolean removeClusterMember(ClusterType cluster,
                            DataType member)
Removes a member from the given cluster.

Parameters:
cluster - The cluster to remove the member from.
member - The member to remove.
Returns:
True if the member was successfully removed. False if there was an error, such as the member not actually being in the cluster to start with.