| Trees | Indices | Help |
|
|---|
|
|
object --+
|
BaseTree --+
|
ImmutableTree
Tree data structure. This is immutable and assumes that the data structure will never be changed. Don't try to change it, as this will violate key assumptions. Instead, convert to a mutable tree.
Immutability is not enforced at all, just assumed.
The advantage of using this over the mutable tree is that certain things, like postorder numbers, can be precomputed, since we know the graph won't change.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
|
Inherited from |
|||
|
|||
x.__init__(...) initializes x; see help(type(x)) for signature
|
Returns a postorder list of all the nodes in this node's subtree, including itself.
|
Returns the index of this node in the tree according to a postorder ordering. This is inefficient, because it has to recompute the postorder every time. It is more efficient on ImmutableTree, because it can precompute the postorder. Note that it is looking for a node by identity, not equality.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Mon Nov 26 16:04:57 2012 | http://epydoc.sourceforge.net |