net.sourceforge.olduvai.accordiondrawer
Class SplitAxis.Debug

java.lang.Object
  extended by net.sourceforge.olduvai.accordiondrawer.SplitAxis.Debug
Enclosing class:
SplitAxis

public class SplitAxis.Debug
extends java.lang.Object

Internal class for debugging the split axis class.

Author:
Peter McLachlan (spark343@cs.ubc.ca)

Constructor Summary
SplitAxis.Debug()
           
 
Method Summary
 void checkAllBounds()
          Verify that the split axis structure is valid.
private  void checkAllBoundsRecursive(SplitLine line)
          Recursive part of checkAllBounds().
 void checkSubTreeSizes()
          Check the size of the subtrees, recursively.
private  void checkSubTreeSizesRecursive(SplitLine line)
          Recursive part of checkSubTreeSizes().
 SplitLine getPrevious(SplitLine line)
          Get the previous line, with the SplitAxis.previous(SplitLine) function supplied by the parent class.
 SplitLine getSuccessor(SplitLine line)
          Get the next line, with the SplitAxis.successor(SplitLine) function supplied by the parent class.
 void printAllAbsoluteValues()
          Debugging function to print the absolute values for the entire tree from left to right.
 void setAllBounds(SplitLine line)
          Depending on whether line is a left or right child node, set the opBound value of line to be the left or right bound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitAxis.Debug

public SplitAxis.Debug()
Method Detail

printAllAbsoluteValues

public void printAllAbsoluteValues()
Debugging function to print the absolute values for the entire tree from left to right.


checkAllBounds

public void checkAllBounds()
Verify that the split axis structure is valid. Starts checking at root, recursive calls with checkAllBoundsRecursive(SplitLine).


checkAllBoundsRecursive

private void checkAllBoundsRecursive(SplitLine line)
Recursive part of checkAllBounds(). A line's parent is one bound, the other bound is checked recursively. Recursion continues on children of the current line.

Parameters:
line - Current line to check bounds.

checkSubTreeSizes

public void checkSubTreeSizes()
Check the size of the subtrees, recursively. Calls checkSubTreeSizesRecursive(SplitLine) then adds results of left and right to itself (1).


checkSubTreeSizesRecursive

private void checkSubTreeSizesRecursive(SplitLine line)
Recursive part of checkSubTreeSizes().

Parameters:
line - Current line to check.

setAllBounds

public void setAllBounds(SplitLine line)
Depending on whether line is a left or right child node, set the opBound value of line to be the left or right bound. NOTE: THIS IS AN O(n) operation intended for debugging.

Parameters:
line - Line to set bounds of. Initially root, then this function is called recursively.

getSuccessor

public SplitLine getSuccessor(SplitLine line)
Get the next line, with the SplitAxis.successor(SplitLine) function supplied by the parent class.

Parameters:
line - Line to get next of.
Returns:
Next line, beside the input parameter.

getPrevious

public SplitLine getPrevious(SplitLine line)
Get the previous line, with the SplitAxis.previous(SplitLine) function supplied by the parent class.

Parameters:
line - Line to get previous of.
Returns:
Previous line, beside the input parameter.