Adds 2 routines to insert new leaf sequences to an internally labelled dag.
insert_node_at_all_possible_places adds the new node as a new child of every internal node in the dag.
insert_node adds the new node as a child of the closest labelled node in the dag if that node is internal, or as a sibling if that node is a leaf. In order to ensure that every resulting tree in the dag contains the new node, this routine then iterates through the nodes that cannot be in the same tree as the first choice of internal node, and adds the new node as a child to the closest node. This process is repeated until every tree is guaranteed to contain the new node.
Adds 2 routines to insert new leaf sequences to an internally labelled dag.
insert_node_at_all_possible_places
adds the new node as a new child of every internal node in the dag.insert_node
adds the new node as a child of the closest labelled node in the dag if that node is internal, or as a sibling if that node is a leaf. In order to ensure that every resulting tree in the dag contains the new node, this routine then iterates through the nodes that cannot be in the same tree as the first choice of internal node, and adds the new node as a child to the closest node. This process is repeated until every tree is guaranteed to contain the new node.