Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Graphs & Networks > Graph Operations and Modifications > VertexAdd >
Mathematica > Visualization and Graphics > Graphs & Networks > Graph Operations and Modifications > VertexAdd >
Mathematica > Mathematics and Algorithms > Graphs & Networks > Constructing Graphs > Graph Operations and Modifications > VertexAdd >

VertexAdd

VertexAdd
makes a graph by adding the vertex v to the graph g.
VertexAdd
adds a collection of vertices to g.
  • VertexAdd will add the vertex v only if it does not already exist in g.
Add a vertex to a complete graph:
Add a vertex to a complete graph:
In[1]:=
Click for copyable input
Out[1]=
VertexAdd works with undirected graphs:
Directed graphs:
Add a set of vertices to the graph:
Works with large graphs:
VertexAdd does not change the EdgeList:
The number of vertices can be found using VertexCount:
New in 8
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF