Class ClusterNode
java.lang.Object
cz.fidentis.analyst.engines.face.batch.clustering.dto.ClusterNode
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChild
(ClusterNode child) Adds child to the node.void
addLeafName
(String leafName) Adds leaf name to the node.void
appendLeafNames
(List<String> names) Appends list of leaf names to the node.Returns left child of the node.getName()
Returns right child of the node.void
removeChild
(ClusterNode child) Removes child from list of childrenvoid
Removes all children from list of childrenvoid
removeLeafName
(String leafName) Removes leaf name from list of leaf namesvoid
setDistance
(Distance distance) void
void
setParent
(ClusterNode parent) toString()
-
Constructor Details
-
ClusterNode
Creates new instance of ClusterNode.- Parameters:
name
- name of the node
-
-
Method Details
-
addLeafName
Adds leaf name to the node.- Parameters:
leafName
- name of the leaf
-
appendLeafNames
Appends list of leaf names to the node.- Parameters:
names
- list of leaf names
-
addChild
Adds child to the node.- Parameters:
child
- child node
-
getName
-
setName
-
setParent
-
getLeafNames
-
getDistance
-
setDistance
-
getParent
-
getChildren
-
getLeftChild
Returns left child of the node.- Returns:
- left child of the node or null if the node has no children.
-
getRightChild
Returns right child of the node.- Returns:
- right child of the node or null if the node has no children or if the node has only one child.
-
removeChild
Removes child from list of children- Parameters:
child
- child to be removed
-
removeLeafName
Removes leaf name from list of leaf names- Parameters:
leafName
- leaf name to be removed
-
removeChildren
public void removeChildren()Removes all children from list of children -
toString
-