node_algorithms#

Simple algorithms/functions regarding nodes.

Functions

add_node_to(k, node_for_adding, node_type[, ...])

param k:

planar diagram instance for adding a node

degree_sequence(g)

name_for_new_node(k[, default])

Returns a natural next available node name for the graph/knot K.

name_for_next_node_generator(k[, count, default])

Returns a natural next available node name for the graph/knot K.

permute_node(k, node, p)

Permute the endpoints of the node of knot k.

relabel_nodes(G, mapping)

Relabels nodes in place.