VertexAdd

VertexAdd[g,v]
makes a graph by adding the vertex v to the graph g.

VertexAdd[g,{v1,v2,}]
adds a collection of vertices to g.

DetailsDetails

  • VertexAdd[g,v] will add the vertex v only if it does not already exist in g.
  • VertexAdd works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Introduced in 2010
(8.0)
| Updated in 2014
(10.0)