Skip to contents

A k-ary tree is a tree where each vertex has up to k children. The symmetry of the graph depends on n.

Usage

graph_kary_tree(n, children = 2L, mode = 0L)

# graph_tree = graph_kary_tree

Arguments

n

An integer value, the number of vertices.

children

Integer, the number of children of a vertex in the tree.

mode

An integer value, igraph_tree_mode_t {0: OUT, 1: IN, 2: UNDIRECTED}

Value

An igraph_ptr object.

See also

Other deterministic generators: graph_create(), graph_empty(), graph_famous(), graph_full(), graph_square_lattice(), graph_star()

Examples

graph_kary_tree(5L)
#> $V  tibble [5 × 0] (S3: tbl_df/tbl/data.frame)
#>  Named list()
#> # A tibble: 4 × 2
#>    from    to
#>   <int> <int>
#> 1     1     2
#> 2     1     3
#> 3     2     4
#> 4     2     5