cutcutcodec.core.edit.operation.add.add_node¶
- cutcutcodec.core.edit.operation.add.add_node(graph: MultiDiGraph, node: str, attrs: dict[str]) None[source]¶
Add a node to the graph.
The parameters can be compute by
cutcutcodec.core.compilation.tree_to_graph.new_node.Parameters¶
- graphnetwork.MultiDiGraph
The assembly graph which does not yet contain the node to be added. The operations on this graph will be performed in-place.
- nodestr
The name of the node to add. It must be new.
- attrsdict[str]
The new node attributes.
Raises¶
- KeyError
If the node is in the graph.