GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


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

GraphTheory

  

DrawNetwork

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

DrawNetwork(G)

DrawNetwork(G, st)

DrawNetwork(G, S, T)

DrawNetwork(G, S, T, st)

Parameters

G

-

graph

st

-

(optional) 'horizontal', 'vertical'

S

-

(optional) vertex

T

-

(optional) vertex

Description

• 

DrawNetwork displays the vertices, arcs and vertex labels of a network. A network is a directed graph with at least one vertex with indegree 0 (the source) and at least one vertex with outdegree 0 (the sink).

• 

If you specify S and T, the graph is displayed with S as the main source and T as the main sink.

• 

The network can be displayed either horizontally or vertically.

• 

Remaining options are passed on to the DrawGraph command.

Examples

with(GraphTheory):

N := Digraph({[1,2],[1,3],[2,4],[3,4]});

NGraph 1: a directed unweighted graph with 4 vertices and 4 arc(s)

(1)

DrawNetwork(N);

DrawNetwork(N, 'horizontal');

G := Digraph({[1,3],[2,3],[3,4],[3,5]}):

IsNetwork(G);

1,2,4,5

(2)

DrawNetwork(G, 2, 5);

See Also

Digraph

IsNetwork

MaxFlow

RandomGraphs[RandomNetwork]