Returns for tree intree an Nx1 vector T
which is one if a given node is a termination point (exactly 0 daughter nodes) and zero else.
Example:
>> T = T_tree (sample2_tree)'
[0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1]
>> sum (T) → number of termination points
5
>> find (T) → indices of termination points
[8, 9, 13, 14, 15]
This work is licensed under a
Creative Commons Attribution-Noncommercial-Share Alike 3.0 License