makes a graph by adding the vertex v to the graph g.
adds a collection of vertices to g.
uses rules vw to specify the graph g.
Details and Options
- 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.
Examplesopen allclose all
Basic Examples (1)
Add a vertex to a complete graph:
VertexAdd works with undirected graphs:
Add a set of vertices to the graph:
Use rules to specify the graph:
VertexAdd works with large graphs:
Properties & Relations (2)
Introduced in 2010
Updated in 2014