Class Tree

java.lang.Object
  extended by Tree

public class Tree
extends Object


Method Summary
 int getN()
           
 void setDiags(IntPair[] diags)
           
 void setFlips(IntPair[] flips)
           
 void setupDraw(IntPair[] intNodes, IntPair[] leaves, IntPair[] intEdges, IntPair[] leafEdges)
           
static Tree unhash(int n, int code)
          Return the tree with n internal vertices and having the given Catalan code (which must be between 0 and C(n), inclusive).
static boolean validTree(Tree tree)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getN

public int getN()

validTree

public static boolean validTree(Tree tree)

unhash

public static Tree unhash(int n,
                          int code)
Return the tree with n internal vertices and having the given Catalan code (which must be between 0 and C(n), inclusive).

Parameters:
n - the node count
code - the Catalan code

setDiags

public void setDiags(IntPair[] diags)

setFlips

public void setFlips(IntPair[] flips)

setupDraw

public void setupDraw(IntPair[] intNodes,
                      IntPair[] leaves,
                      IntPair[] intEdges,
                      IntPair[] leafEdges)