BGROW directive

Adds new branches to a node of a tree.


No options


Parameters

TREE = trees
Trees to be extended

NODE = scalars
Node at which to extend each tree

NBRANCHES = scalars
Number of branches to add to each node; default 2

POSITION = scalars
Position at which to add the branches to each node; default * i.e. after all the current braches from the node

NEWNODES = variates
Returns the number(s) allocated to the new nodes


Description

BGROW provides the basic tree utility of adding new branches at a node, which is used for example by the BCONSTRUCT procedure. Other tree utilities are described in the description of the TREE directive (which declares and initializes a tree).

   The tree to be extended is specified by the TREE parameter, and the NODE parameter indicates the node at which the new branches are to be added. The NBRANCHES parameter specifies the number of branches to add. The POSITION specifies where to add them if the node is a non-terminal node; by default they are added after all the branches currently from the node. The NEWNODES parameter saves a variate containing the numbers of the new nodes (i.e. the terminal nodes at the ends of the new branches).


Options: none.

Parameters: TREE, NODE, NBRANCHES, POSITION, NEWNODES.