No trifurcations allowed!!

Checks if tree intree (or a BCT vector of terminals (0), continuations (1) and branches (2)) is conform to BCT order (see introduction section “BCT formalism”).

Examples:

>> isBCT_tree ([1 2 1 0 2 0 0])

1

>> isBCT_tree ([1 1 1 1])   ← this branch does not terminate

0

>> isBCT_tree (sample2_tree)

1

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License