PlanarEmbedding.add_half_edge#
- PlanarEmbedding.add_half_edge(start_node, end_node, *, cw=None, ccw=None)[source]#
Adds a half-edge from
start_nodetoend_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/ccwcan 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
Noneif adding the first out-half-edge ofstart_node.
- Raises:
- NetworkXException
If the
cworccwnode is not a successor ofstart_node. Ifstart_nodehas successors, but neithercworccwis provided. If bothcwandccware specified.
See also