PlanarEmbedding.add_half_edge#
- PlanarEmbedding.add_half_edge(start_node, end_node, *, cw=None, ccw=None)[source]#
Adds a half-edge from
start_node
toend_node
.If the half-edge is not the first one out of
start_node
, a reference node must be provided either in the clockwise (parametercw
) or in the counterclockwise (parameterccw
) direction. Only one ofcw
/ccw
can be specified (or neither in the case of the first edge). Note that specifying a reference in the clockwise (cw
) direction means inserting the new edge in the first counterclockwise position with respect to the reference (and vice-versa).- Parameters:
- start_nodenode
Start node of inserted edge.
- end_nodenode
End node of inserted edge.
- cw, ccw: node
End node of reference edge. Omit or pass
None
if adding the first out-half-edge ofstart_node
.
- Raises:
- NetworkXException
If the
cw
orccw
node is not a successor ofstart_node
. Ifstart_node
has successors, but neithercw
orccw
is provided. If bothcw
andccw
are specified.
See also