gov.sandia.cognition.learning.algorithm.clustering.cluster
Class DefaultIncrementalClusterCreator<DataType>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.clustering.cluster.DefaultClusterCreator<DataType>
          extended by gov.sandia.cognition.learning.algorithm.clustering.cluster.DefaultIncrementalClusterCreator<DataType>
Type Parameters:
DataType - The data type to create the clusters over.
All Implemented Interfaces:
ClusterCreator<DefaultCluster<DataType>,DataType>, IncrementalClusterCreator<DefaultCluster<DataType>,DataType>, CloneableSerializable, Serializable, Cloneable

public class DefaultIncrementalClusterCreator<DataType>
extends DefaultClusterCreator<DataType>
implements IncrementalClusterCreator<DefaultCluster<DataType>,DataType>

A default implementation of the IncrementalClusterCreator interface that just creates a cluster as having a collection of members.

Since:
3.1.1
Author:
Justin Basilico
See Also:
Serialized Form

Constructor Summary
DefaultIncrementalClusterCreator()
          Creates a new DefaultIncrementalClusterCreator.
 
Method Summary
 void addClusterMember(DefaultCluster<DataType> cluster, DataType member)
          Adds a member to the given cluster.
 DefaultCluster<DataType> createCluster()
          Creates a new, empty cluster.
 boolean removeClusterMember(DefaultCluster<DataType> cluster, DataType member)
          Removes a member from the given cluster.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.clustering.cluster.DefaultClusterCreator
createCluster
 
Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable
clone
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.learning.algorithm.clustering.cluster.ClusterCreator
createCluster
 
Methods inherited from interface gov.sandia.cognition.util.CloneableSerializable
clone
 

Constructor Detail

DefaultIncrementalClusterCreator

public DefaultIncrementalClusterCreator()
Creates a new DefaultIncrementalClusterCreator.

Method Detail

createCluster

public DefaultCluster<DataType> createCluster()
Description copied from interface: IncrementalClusterCreator
Creates a new, empty cluster.

Specified by:
createCluster in interface IncrementalClusterCreator<DefaultCluster<DataType>,DataType>
Returns:
A new, empty cluster.

addClusterMember

public void addClusterMember(DefaultCluster<DataType> cluster,
                             DataType member)
Description copied from interface: IncrementalClusterCreator
Adds a member to the given cluster.

Specified by:
addClusterMember in interface IncrementalClusterCreator<DefaultCluster<DataType>,DataType>
Parameters:
cluster - The cluster to add a member to.
member - The member to add to the cluster.

removeClusterMember

public boolean removeClusterMember(DefaultCluster<DataType> cluster,
                                   DataType member)
Description copied from interface: IncrementalClusterCreator
Removes a member from the given cluster.

Specified by:
removeClusterMember in interface IncrementalClusterCreator<DefaultCluster<DataType>,DataType>
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.