new Gcntree_node(config)
A Gcntree node
Parameters:
Name | Type | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
Object | configuration
Properties
|
- Source:
Methods
add_child(node) → {Gcntree_node}
Add a child to this node
Parameters:
Name | Type | Description |
---|---|---|
node |
Gcntree_node | node to add as a child |
- Source:
Returns:
the new child node
- Type
- Gcntree_node
degree() → {number}
Compute the degree of this node
- Source:
Returns:
- Type
- number
delete_child(node) → {Gcntree_node}
Delete a child from this node
Parameters:
Name | Type | Description |
---|---|---|
node |
Gcntree_node | the node to delete |
- Source:
Returns:
the deleted node
- Type
- Gcntree_node
get_all_children() → {Array.<Gcntree_node>}
Fetch all of this node's children
- Source:
Returns:
- Type
- Array.<Gcntree_node>