Digraph(V, L, opts)
Digraph(V, E, A, opts)
list of vertices or number of vertices
set of arcs
Array or list of sets of vertices indicating vertex neighbors
adjacency Matrix (edge weights)
(optional) zero or more options as specified below
The opts parameter is used to specify one or more additional properties of the graph.
weighted or weighted=true
Specifies that this graph has weighted edges.
unweighted or weighted=false
Specifies that this graph has no edge weights.
Specifies whether self-loops should be permitted in the graph. If false, an error will be issued if the edge information provided with parameters E, L, T, or A contains a self-loop. The default is true.
Specifies a color or list of colors to associate with the vertices in vertex order.
Specifies coordinate positions for the vertices for use with DrawGraph.
The Digraph command creates a digraph (directed graph) with the given parameters. The input parameters may appear in any order; however, they must be compatible.
A detailed description of the meaning of each parameter is found in the Graph help page.
G≔Graph 1: a directed unweighted graph with 4 vertices and 4 arc(s)
G≔Graph 2: a directed unweighted graph with 4 vertices and 4 arc(s)
G≔Graph 3: a directed weighted graph with 4 vertices and 4 arc(s)
The selfloops option was introduced in Maple 2020.
For more information on Maple 2020 changes, see Updates in Maple 2020.
Download Help Document
What kind of issue would you like to report? (Optional)