sampo.structurator.graph_insertion#

Overview#

Function#

graph_in_graph_insertion(master_wg, master_start, master_finish, slave_wg, change_id)

Inserts the slave WorkGraph into the master WorkGraph,

Functions#

sampo.structurator.graph_insertion.graph_in_graph_insertion(master_wg: sampo.schemas.graph.WorkGraph, master_start: sampo.schemas.graph.GraphNode, master_finish: sampo.schemas.graph.GraphNode, slave_wg: sampo.schemas.graph.WorkGraph, change_id: bool = True) sampo.schemas.graph.WorkGraph#

Inserts the slave WorkGraph into the master WorkGraph, while the starting vertex slave_wg becomes the specified master_start, and the finishing vertex is correspondingly master_finish :param master_wg: the WorkGraph into which the insertion is performed :param master_start: GraphNode which will become the parent for the entire slave_wg :param master_finish: GraphNode which will become a child for the whole slave_wg :param slave_wg: WorkGraph to be inserted into master_wg :param change_id: do ids in the new graph need to be changed :return: new union WorkGraph