org.knime.base.util.kdtree
Class NonterminalNode

java.lang.Object
  extended by org.knime.base.util.kdtree.NonterminalNode
All Implemented Interfaces:
Node

 class NonterminalNode
extends Object
implements Node

This class represents non-terminal nodes inside the k-d tree. A non-terminal node defines a split of the data in its two sub-trees. The index of the split attribute and the corresponding split-value are stored inside the node, together with the two child nodes.

Author:
Thorsten Meinl, University of Konstanz

Constructor Summary
NonterminalNode(int splitAttribute, double splitValue, Node left, Node right)
          Creates a new non-terminal node.
 
Method Summary
 Node getLeft()
          Returns the left child node.
 Node getRight()
          Returns the right child node.
 int getSplitAttribute()
          Returns the attribute index that is used for the split.
 double getSplitValue()
          Returns the split value.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NonterminalNode

public NonterminalNode(int splitAttribute,
                       double splitValue,
                       Node left,
                       Node right)
Creates a new non-terminal node.

Parameters:
splitAttribute - the index of the split attribute
splitValue - the split value
left - the left child, can be null
right - the right child, can be null
Method Detail

getSplitAttribute

public int getSplitAttribute()
Returns the attribute index that is used for the split.

Returns:
the split attribute index

getSplitValue

public double getSplitValue()
Returns the split value.

Returns:
the split value

getLeft

public Node getLeft()
Returns the left child node. Can be null.

Returns:
the left child

getRight

public Node getRight()
Returns the right child node. Can be null.

Returns:
the right child

toString

public String toString()

Overrides:
toString in class Object


Copyright, 2003 - 2010. All rights reserved.
University of Konstanz, Germany.
Chair for Bioinformatics and Information Mining, Prof. Dr. Michael R. Berthold.
You may not modify, publish, transmit, transfer or sell, reproduce, create derivative works from, distribute, perform, display, or in any way exploit any of the content, in whole or in part, except as otherwise expressly permitted in writing by the copyright owner or as specified in the license file distributed with this product.