Skip to contents

This is the primary class implemented in this package.

Usage

tree(nodes = class_missing)

Arguments

nodes

A list of nodes, as created via node(), which form a tree.

Value

An object of class "dendro::tree", "S7_object"

Examples

tree()
#> <dendro::tree>
#>  @ size        : int 0
#>  @ node_indices: NULL
#>  @ next_idx    : int 1
#>  @ root        : int NA
#>  @ nodes       : list()
tree(list(node(1L)))
#> <dendro::tree>
#>  @ size        : int 1
#>  @ node_indices: int 1
#>  @ next_idx    : int 2
#>  @ root        : int 1
#>  @ nodes       :List of 1
#>  .. $ : <dendro::node>
#>  ..  ..@ index   : int 1
#>  ..  ..@ value   : list()
#>  ..  ..@ parent  : int(0) 
#>  ..  ..@ children: int(0)