Tree

scalation.database.Tree
See theTree companion object
class Tree(val root: TreeNode, depth: Int, val name: String)

The Tree class provides a data structure for multi-way trees.

Value parameters

depth

the estimated average depth of the tree

name

the name of the tree

root

the root node of the tree

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

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.

Value parameters

p

the parent node (null for root)

Attributes

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.

Value parameters

n

the new node to be added

p

the parent node (null for root)

Attributes

def apply(i: Int): TreeNode

Return the i-th node.

Return the i-th node.

Value parameters

the

index of the node to return

Attributes

def labelMap: Map[Pair, ValueType]

Return a map of labels for nodes with incoming edges in the tree.

Return a map of labels for nodes with incoming edges in the tree.

Attributes

def printTree(): Unit

Print the tree.

Print the tree.

Attributes

def size: Int

Return the number of nodes in the tree.

Return the number of nodes in the tree.

Attributes

Concrete fields

val name: String
val root: TreeNode