Home | Trees | Indices | Help |
---|
|
object --+ | BinaryTrees
class BinaryTree() - basic BT functionality
This class implements basic binary tree functionality, such as binary tree generation and numbering.
Most methods are static (class) methods. Basically, this class is used to encapsulated conjoined functions.
|
|||
Inherited from |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
Inherited from |
|
Calculate number of possible binary trees. n -> number of inner nodes Return catalan number of n. |
Generate number i binary tree as a binary in order sequence. n -> number of inner nodes i -> index of binary tree, 0 <= i < catalan_number(n) From all possible binary trees with n inner nodes the i'tht tree is generated as an pre-order binary sequence. Algorithm by Ruskey1978. |
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Wed Apr 27 17:47:09 2011 | http://epydoc.sourceforge.net |