Skip to content

OpenBIMRL | Tree functions

Class path: tree.createTree

Create Tree

createTree1.png

Description

Constructs a tree structure based on pairwise assignment of paths/traces and associated values. The lowest level of the path indexing is the point at which the leaf node with its value is created.

Important: The number of elements of traces and values must be identical in order to enable assignment in the order of the list.

Input

Input Name Typ Description
0 traces List Describes the subtrees and leaf nodes which are to be filled with values in pairs.
1 values List A list with any values that flow into the path or define a new path.

Output

Output Name Typ Description
0 tree Tree The constructed tree.

Use/Example

createTree2.png

Node representation with example values

createTree3.png

createTree is the inverse of flatten, i.e. it reconstructs the tree structure

Sample file