class Tree extends AnyRef
The Tree
class provides a data structure for multi-way trees with
colored nodes.
- Alphabetic
- By Inheritance
- Tree
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
Value Members
-
def
add(p: TreeNode, n: TreeNode): TreeNode
Add a new node, link it in the tree and return it.
Add a new node, link it in the tree and return it.
- p
the parent node (null for root)
- n
the new node to be added
-
def
add(p: TreeNode): TreeNode
Create and add a new node, link it in the tree and return it.
Create and add a new node, link it in the tree and return it.
- p
the parent node (null for root)
-
def
apply(i: Int): TreeNode
Return the 'i'th node.
-
def
labelMap: Map[Pair, TLabel]
Return a map of labels for nodes with incoming edges in the tree.
- val name: String
-
def
printTree(): Unit
Print the tree.
- val root: TreeNode
-
def
size: Int
Return the number of nodes in the tree.