An abstract tree data model
AbstractTree
Type Parameters
| Name | Description |
|---|---|
T | the data type of the reference key its associated data. |
K | the data type of the reference key |
01 Syntax
Microsoft.VisualBasic.Data.GraphTheory.AbstractTree`2
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| CountLeafs | 2 | 计算出所有的叶节点的总数,包括自己的child的叶节点 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| Childs | 1 | Childs table, key is the property Vertex.label |
| ChildNodes | 1 | a collection of the direct childs in current tree node |
| Parent | 1 | |
| Child | 1 | Get child node with a reference key |
| Count | 1 | Not null child count in this tree node. |
04 Members
CountLeafs
计算出所有的叶节点的总数,包括自己的child的叶节点
CountLeafs(
`0, Int32)对某一个节点的所有的叶节点进行计数
Parameters
| Name | Type | Description |
|---|---|---|
node | `0 | - |
count | Int32 | - |
Childs
Childs table, key is the property Vertex.label
ChildNodes
a collection of the direct childs in current tree node
Parent
Remarks
在序列化之中会需要忽略掉这个属性,否则会产生无限递归
Child(
`1)Get child node with a reference key
Parameters
| Name | Type | Description |
|---|---|---|
key | `1 | - |
Count
Not null child count in this tree node.
Remarks
请注意,这个属性并不是返回的AbstractTree.Childs的元素数量, 而是返回当前树节点下的所有的子节点的数量