Add a single node n.
Parameters: | n : node
|
---|
Notes
On many platforms hashable items also include mutables such as Graphs, though one should be careful that the hash doesn’t change on mutables.
Examples
>>> G=nx.Graph()
>>> G.add_node(1)
>>> G.add_node('Hello')
>>> K3=nx.complete_graph(3)
>>> G.add_node(K3)
>>> G.number_of_nodes()
3