com.phasmidsoftware.lascala.tree.Tree
See theTree companion trait
object Tree
Attributes
Members list
Value members
Concrete methods
def createIndexedTree[K, A](node: Node[A], index: Int = ...)(implicit vo: ValueOps[K, A]): IndexedNode[A]
Method to create an indexed tree (suitable for modified pre-order tree traversal -- MPTT).
Method to create an indexed tree (suitable for modified pre-order tree traversal -- MPTT).
Type parameters
- A
-
the underlying type
Value parameters
- index
-
the starting value of index
- node
-
the node representing the tree to be indexed
Attributes
- Returns
-
an IndexedNode[A]
def populateGeneralTree[K, A](root: Option[A], values: Seq[A])(implicit evidence$1: TreeBuilder[A], vo: ValueOps[K, A]): Tree[A]
def populateOrderedTree[K, A](values: Seq[A])(implicit evidence$1: TreeBuilder[A], vo: ValueOps[K, A]): Option[Tree[A]]
Method to populate an ordered tree.
Method to populate an ordered tree.
Type parameters
- A
-
the underlying value type
- K
-
the key type
Value parameters
- values
-
the values of the nodes to put in the tree
- vo
-
the (implicit) ValueOps
Attributes
- Returns
-
a Tree[A]
Concrete fields
In this article