subdivide_arc#

subdivide_arc(k: PlanarDiagram, arc, new_node_name=None, **attr) str#

Subdivides an arc by introducing a new vertex along the arc. If arc is not a set, then the new node will be (arc[0], arc[1])

Args:

k (PlanarDiagram): The planar diagram. arc (list): A list containing two endpoints defining the arc to be subdivided. new_node_name: attr (dict): Additional attributes for the new node.

Returns:

str: The name of the newly created node.