org.knime.base.node.viz.plotter.dendrogram
Class BinaryTree<T>

java.lang.Object
  extended by org.knime.base.node.viz.plotter.dendrogram.BinaryTree<T>
Type Parameters:
T - the type of the nodes content.

public class BinaryTree<T>
extends Object

Author:
Fabian Dill, University of Konstanz

Nested Class Summary
static class BinaryTree.Traversal
          Tree traversal methods.
 
Constructor Summary
BinaryTree(BinaryTreeNode<T> root)
           
 
Method Summary
 void addNode(BinaryTreeNode<T> newNode)
          Adds a node to this tree.
 List<BinaryTreeNode<T>> getNodes(BinaryTree.Traversal traversal)
          Returns the nodes of this tree as a ordered list, where the order depends on the traversal type defined in the enum BinaryTree.Traversal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BinaryTree

public BinaryTree(BinaryTreeNode<T> root)
Parameters:
root - the root node of this tree.
Method Detail

getNodes

public List<BinaryTreeNode<T>> getNodes(BinaryTree.Traversal traversal)
Returns the nodes of this tree as a ordered list, where the order depends on the traversal type defined in the enum BinaryTree.Traversal.

Parameters:
traversal - the traversal method to use.
Returns:
an ordered list of the nodes of this tree

addNode

public void addNode(BinaryTreeNode<T> newNode)
Adds a node to this tree. The tree is build up level by level from left to right.

Parameters:
newNode - the node to add.


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.