larch.NestingTree.add_edge#
- NestingTree.add_edge(u, v, implied=False, _clear_caches=True, **kwarg)[source]#
Add an edge between u and v.
The nodes u and v will be automatically added if they are not already in the graph.
Edge attributes can be specified with keywords.
- Parameters:
u (int) – Nodes should be integer codes. The upstream node u is a nest or the root node. Downsteam node v can be a nest or elemental alternative.
v (int) – Nodes should be integer codes. The upstream node u is a nest or the root node. Downsteam node v can be a nest or elemental alternative.
implied (bool, default False) – Implied edges are for connection of otherwise unconnected nests to the root node.
_clear_caches (bool, default True)
kwarg (keyword arguments, optional) – Edge data (or labels or objects) can be assigned using keyword arguments.