python 3中的列表派生树数据结构
pyTree的Python项目详细描述
pytree
==
>树数据结构的python实现
=树('c11')
child31=tree('c31')
child111=tree('c111')
child112=tree('c112')
child03])
child01.addchild(child11)
child03.addchild(child31)
child11.addchild(child111)
child11.addchild(child112)
#root.nestedTree()
#### Output:
Root
|___ C01
| |___ C11
| |___ C111
| |___ C112
|___ C02
|___ C03
| |___ C31
### Initialization case 2: Initialize with child
child31 = tree('c31')
child03=tree('c03',child31)
child03] )
## Methods
Methods
|___ addChild
|___ addChildren
|___ getParent
|___ getChild
|___ getChildren
|___ getNode
|___ delChild
|___ delNode
|___ getRoot
|___ isRoot
|___ isBranch
|___ prettyTree
|___ Nestedtree
许可
版权所有2012 YOYO ZHOU。在[apache license 2.0]下发布(http://www.apache.org/licenses/license-2.0.html)。有关详细信息,请参见“license”文件。
==
>树数据结构的python实现
=树('c11')
child31=tree('c31')
child111=tree('c111')
child112=tree('c112')
child03])
child01.addchild(child11)
child03.addchild(child31)
child11.addchild(child111)
child11.addchild(child112)
#root.nestedTree()
#### Output:
Root
|___ C01
| |___ C11
| |___ C111
| |___ C112
|___ C02
|___ C03
| |___ C31
### Initialization case 2: Initialize with child
child31 = tree('c31')
child03=tree('c03',child31)
child03] )
## Methods
Methods
|___ addChild
|___ addChildren
|___ getParent
|___ getChild
|___ getChildren
|___ getNode
|___ delChild
|___ delNode
|___ getRoot
|___ isRoot
|___ isBranch
|___ prettyTree
|___ Nestedtree
许可
版权所有2012 YOYO ZHOU。在[apache license 2.0]下发布(http://www.apache.org/licenses/license-2.0.html)。有关详细信息,请参见“license”文件。