Connects this edge to a source node and a destination node.
This method checks that both src
and dest
are valid Node objects and that the edge is not already connected,
unless reconnect
is set to True. It also registers this edge in the out_edges
of the source node and the
in_edges
of the destination node.
Parameters: |
-
src
(Node )
–
The source node to connect.
-
dest
(Node )
–
The destination node to connect.
-
reconnect
(bool , default:
False
)
–
If True, allows reconnection even if the edge is already connected. Defaults to False.
|
Raises: |
-
ValueError
–
If the edge is already connected and reconnect is False.
-
ValueError
–
If src or dest is not a valid Node instance.
|