GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/AddVertex

GraphTheory

  

AddVertex

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

AddVertex(G, V)

Parameters

G

-

graph

V

-

vertex or list of vertices

Description

• 

The AddVertex command adds a vertex or vertices to a graph. A new graph is returned which contains the specified set of vertices in addition to the vertices in the original graph G.

Examples

withGraphTheory:

GCycleGraph5

GGraph 1: an undirected unweighted graph with 5 vertices and 5 edge(s)

(1)

AddVertexG,a,b

Graph 2: an undirected unweighted graph with 7 vertices and 5 edge(s)

(2)

AddVertexG,4

Error, (in GraphTheory:-AddVertex) some of the vertices to be added are already present in the graph

See Also

AddArc

AddEdge

CycleGraph

DeleteVertex

Graph