is.binary_tree: Test if a tree is a binary tree

Description Usage Arguments Value Examples

Description

The function is.binary_tree tests if a tree is binary.

Usage

1

Arguments

x

A tree to be tested.

Value

A logical.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## FALSE
is.binary_tree(empty_tree())

## FALSE
tr = r_(s = list(r_("toto"), r_("tata")))
is.binary_tree(tr) # unrooted tree

## TRUE
tr = r_("titi", s = list(r_("toto"), r_("tata")))
is.binary_tree(tr)

paulponcet/oak documentation built on May 14, 2019, 7:21 p.m.