cutcutcodec.core.edit.operation.add.add_edge¶
- cutcutcodec.core.edit.operation.add.add_edge(graph: MultiDiGraph, node_src: str, node_dst: str, index: int) tuple[str, str, str][source]¶
Add a stream to the graph.
Parameters¶
- graphnetwork.MultiDiGraph
The assembly graph which does not yet contain the edge to be added. The operations on this graph will be performed in-place.
- node_srcstr
The name of the starting node, must be present in the graph.
- node_dststr
The name of the arriving node, must be present in the graph.
- indexint
The index of the output stream of the node
node_src.
Returns¶
- edgetuple[str, str, str]
The name of the edge added to the graph.
Raises¶
- KeyError
If one of the nodes is not in the graph.