Algorithm
Development Kit 1.0

Package algs.model.tree

Provides implementations of binary trees and right-threaded binary trees.

See:
          Description

Interface Summary
IBalancedVisitor<K,V> Visitor of nodes within the balanced binary tree.
IVisitor<T extends Comparable<T>> Visitor of nodes.
 

Class Summary
AbstractBinaryTraversal<T extends IBinaryTreeNode> The default traversal class for IBinaryTree trees.
BalancedBinaryNode<K,V> Standard node for an unbalanced binary tree.
BalancedTree<K,V> Balanced Tree, based on stripped down implementation of TreeMap which is itself an implementation of the algorithm as described in Cormen, Leiserson, and Rivest's Introduction to Algorithms (Cormen et al, 2001).
BinaryNode<T extends Comparable> Standard node for an unbalanced binary tree.
BinaryTree<T extends Comparable> Standard unbalanced binary tree.
InorderTraversal<T extends IBinaryTreeNode> Perform an inorder traversal of the tree.
PostorderTraversal<T extends IBinaryTreeNode> Perform a post traversal of the tree.
PreorderTraversal<T extends IBinaryTreeNode> Perform a pre traversal of the tree.
RightThreadedBinaryNode<T extends Comparable> A RightThreadedBinaryNode adds a 'thread' link to the successor node in the Binary Tree for the given node.
RightThreadedBinaryTree<T extends Comparable> Unbalanced right-threaded binary tree.
ValueExtractor<T> Wraps a BinaryNode iterator to be able to extract in a type-safe way the values of the BinaryNodes.
 

Enum Summary
AbstractBinaryTraversal.Phase Binary traversals have three phases.
 

Package algs.model.tree Description

Provides implementations of binary trees and right-threaded binary trees.


Algorithm Development Kit 1.0

This code supports the Algorithms in a Nutshell book, published by O'Reilly Media, Inc. in November 2008. Please visit the book web page to learn of any changes to the code repository or to record a potential defect.