gov.sandia.cognition.learning.algorithm.clustering.hierarchy
Class DefaultClusterHierarchyNode<DataType,ClusterType extends Cluster<DataType>>

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.learning.algorithm.clustering.hierarchy.AbstractClusterHierarchyNode<DataType,ClusterType>
          extended by gov.sandia.cognition.learning.algorithm.clustering.hierarchy.DefaultClusterHierarchyNode<DataType,ClusterType>
Type Parameters:
DataType - The type of the data in the cluster.
ClusterType - The type of cluster contained in the hierarchy node.
All Implemented Interfaces:
Cluster<DataType>, ClusterHierarchyNode<DataType,ClusterType>, CloneableSerializable, Serializable, Cloneable

public class DefaultClusterHierarchyNode<DataType,ClusterType extends Cluster<DataType>>
extends AbstractClusterHierarchyNode<DataType,ClusterType>

A default implementation of the cluster hierarchy node. It keeps a list of its children.

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

Field Summary
protected  List<ClusterHierarchyNode<DataType,ClusterType>> children
          The list of children.
 
Fields inherited from class gov.sandia.cognition.learning.algorithm.clustering.hierarchy.AbstractClusterHierarchyNode
cluster
 
Constructor Summary
DefaultClusterHierarchyNode()
          Creates a new DefaultClusterHierarchyNode.
DefaultClusterHierarchyNode(ClusterType cluster)
          Creates a new DefaultClusterHierarchyNode.
DefaultClusterHierarchyNode(ClusterType cluster, ClusterHierarchyNode<DataType,ClusterType> firstChild, ClusterHierarchyNode<DataType,ClusterType> secondChild)
          Creates a new DefaultClusterHierarchyNode.
DefaultClusterHierarchyNode(ClusterType cluster, List<ClusterHierarchyNode<DataType,ClusterType>> children)
          Creates a new DefaultClusterHierarchyNode.
 
Method Summary
 List<ClusterHierarchyNode<DataType,ClusterType>> getChildren()
          Gets the children of this node.
 void setChildren(ClusterHierarchyNode<DataType,ClusterType> firstChild, ClusterHierarchyNode<DataType,ClusterType> secondChild)
          Sets the children of this node.
 void setChildren(List<ClusterHierarchyNode<DataType,ClusterType>> children)
          Sets the children of this node.
 
Methods inherited from class gov.sandia.cognition.learning.algorithm.clustering.hierarchy.AbstractClusterHierarchyNode
getCluster, getMembers, hasChildren, setCluster
 
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.util.CloneableSerializable
clone
 

Field Detail

children

protected List<ClusterHierarchyNode<DataType,ClusterType extends Cluster<DataType>>> children
The list of children.

Constructor Detail

DefaultClusterHierarchyNode

public DefaultClusterHierarchyNode()
Creates a new DefaultClusterHierarchyNode.


DefaultClusterHierarchyNode

public DefaultClusterHierarchyNode(ClusterType cluster)
Creates a new DefaultClusterHierarchyNode.

Parameters:
cluster - The cluster associated with this node.

DefaultClusterHierarchyNode

public DefaultClusterHierarchyNode(ClusterType cluster,
                                   List<ClusterHierarchyNode<DataType,ClusterType>> children)
Creates a new DefaultClusterHierarchyNode.

Parameters:
cluster - The cluster associated with this node.
children - The children of this node.

DefaultClusterHierarchyNode

public DefaultClusterHierarchyNode(ClusterType cluster,
                                   ClusterHierarchyNode<DataType,ClusterType> firstChild,
                                   ClusterHierarchyNode<DataType,ClusterType> secondChild)
Creates a new DefaultClusterHierarchyNode.

Parameters:
cluster - The cluster associated with this node.
firstChild - The first child.
secondChild - The second child.
Method Detail

getChildren

public List<ClusterHierarchyNode<DataType,ClusterType>> getChildren()
Description copied from interface: ClusterHierarchyNode
Gets the children of this node. May be null if there are no children.

Returns:
The children of this node.

setChildren

public void setChildren(List<ClusterHierarchyNode<DataType,ClusterType>> children)
Sets the children of this node.

Parameters:
children - The children of this node.

setChildren

public void setChildren(ClusterHierarchyNode<DataType,ClusterType> firstChild,
                        ClusterHierarchyNode<DataType,ClusterType> secondChild)
Sets the children of this node.

Parameters:
firstChild - The first child.
secondChild - The second child.