Algorithm
Development Kit 1.0

algs.model.tree.debug
Class RightThreadTreeDebugger

java.lang.Object
  extended by algs.debug.DottyDebugger
      extended by algs.model.tree.debug.RightThreadTreeDebugger
All Implemented Interfaces:
IDebugSearch, IVisitor

public class RightThreadTreeDebugger
extends DottyDebugger
implements IVisitor

Debugging subclass for right-threaded binary trees.

Since:
1.0
Version:
1.0, 6/15/08
Author:
George Heineman

Field Summary
 
Fields inherited from class algs.debug.DottyDebugger
_ctr, BreadthFirstOrdering, defaultFontName, defaultFontSize, DepthFirstOrdering, discarded, edges, goal, nodes, start, TooLarge, unexplored
 
Constructor Summary
RightThreadTreeDebugger()
           
 
Method Summary
 java.lang.String edgeType()
          Default to having nodes with complex record shapes.
 void visit(BinaryNode parentNode, BinaryNode node)
          Visit right-threaded (parent, child) sequence by visiting both nodes separately, then the edge from parent to child, then any threaded edge, if one exists.
 
Methods inherited from class algs.debug.DottyDebugger
complete, getInputString, getKey, labelEdge, markDiscarded, markEdge, markGoal, markStart, markUnexplored, nodeType, numNodes, ordering, rank, visitEdge, visitEdge, visitNode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RightThreadTreeDebugger

public RightThreadTreeDebugger()
Method Detail

edgeType

public java.lang.String edgeType()
Default to having nodes with complex record shapes. Subclasses should override as needed.

Overrides:
edgeType in class DottyDebugger

visit

public void visit(BinaryNode parentNode,
                  BinaryNode node)
Visit right-threaded (parent, child) sequence by visiting both nodes separately, then the edge from parent to child, then any threaded edge, if one exists.

Specified by:
visit in interface IVisitor
Parameters:
parentNode - parent (or null if root) of node being visited.
node - node being visited

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.