Digraph - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


GraphTheory

  

Digraph

  

construct a directed graph

 

Calling Sequence

Parameters

Options

Description

Examples

Compatibility

Calling Sequence

Digraph(V, opts)

Digraph(L, opts)

Digraph(V, L, opts)

Digraph(V, E, A, opts)

Parameters

V

-

list of vertices or number of vertices

E

-

set of arcs

L

-

Array or list of sets of vertices indicating vertex neighbors

A

-

adjacency Matrix (edge weights)

opts

-

(optional) one or more options as specified below

Options

  

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.

• 

selfloops=truefalse

  

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.

• 

vertexcolor=c

  

Specifies a color or list of colors to associate with the vertices in vertex order.

• 

vertexpositions=p

  

Specifies coordinate positions for the vertices for use with DrawGraph.

Description

• 

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.

Examples

(1)

(2)

(3)

(4)

(5)

(6)

(7)

(8)

(9)

(10)

Compatibility

• 

The GraphTheory[Digraph] command was updated in Maple 2020.

• 

The selfloops option was introduced in Maple 2020.

• 

For more information on Maple 2020 changes, see Updates in Maple 2020.

See Also

DrawGraph

DrawNetwork

Edges

Graph

MakeDirected

RandomGraphs[RandomDigraph]

Vertices

 


Download Help Document