ChromAb
Class EdgeTree

java.lang.Object
  |
  +--ChromAb.EdgeTree

public class EdgeTree
extends java.lang.Object

The purpose of this class is to generate a tree of edges from a fragment decomposition, each path from root to leaf specifying a unique valid initial edge configuration.


Field Summary
private  EdgeTree[] children
           
private  int[] edge
           
 
Constructor Summary
  EdgeTree(FragDecom fd)
          Constructor takes a fragment decomposition and produces a tree of edges where each path from root to leaf specifies a unique valid initial edge configuation.
private EdgeTree(int[] edge, FragDecom fd)
          Recursively generates an EdgeTree from an edge and a fragment decomposition.
 
Method Summary
 java.util.Vector allEdgeLists()
          Returns a Vector of EdgeLists where each EdgeList is a traversal of the tree of root to leaf.
 int[] getEdge()
          Returns the edge at this node.
 boolean isLeaf()
          Returns true if this node has no children.
 java.lang.String toString()
           
private  java.lang.String toString(int rank)
          Allows a recursive method to print the tree with tabulation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

edge

private int[] edge

children

private EdgeTree[] children
Constructor Detail

EdgeTree

public EdgeTree(FragDecom fd)
Constructor takes a fragment decomposition and produces a tree of edges where each path from root to leaf specifies a unique valid initial edge configuation.

Parameters:
fd - fragment decomposition.

EdgeTree

private EdgeTree(int[] edge,
                 FragDecom fd)
Recursively generates an EdgeTree from an edge and a fragment decomposition. The edge is stored as the edge for this node. If fd is empty, the node has no children. Otherwise, a pivot edge is chosen, the pivot vertex is pivot_edge[0] (we store free ends of TC and TNC fragments in the 1st position). For each such vertex, all valid initial edges are generated with an associated reduced fragment decomposition. Child nodes are generated from these initial edges and the reduced fragment decompositions.

Parameters:
edge - edge to store in node
fd - frag decom from which to generate children.
Method Detail

getEdge

public int[] getEdge()
Returns the edge at this node.

Returns:
edge at this node.

isLeaf

public boolean isLeaf()
Returns true if this node has no children.

Returns:
true if children = null

allEdgeLists

public java.util.Vector allEdgeLists()
Returns a Vector of EdgeLists where each EdgeList is a traversal of the tree of root to leaf.

Returns:
Vector of EdgeLists

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

toString

private java.lang.String toString(int rank)
Allows a recursive method to print the tree with tabulation.