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

Online Help

All Products    Maple    MapleSim


Overview of the networks Package

 

Calling Sequence

Description

List of networks Package Commands

Examples

Calling Sequence

networks[command](arguments)

command(arguments)

Description

• 

Important: The networks package has been deprecated.  Use the superseding package GraphTheory instead.

• 

Each command in the networks package can be accessed by using either the long form or the short form of the command name in the command calling sequence.

• 

A network is represented by a graph consisting of vertices and edges. The edges may be directed, and loops and multiple edges are allowed. The basic commands in this package perform the manipulation of the underlying graphs. Various properties of the networks as outlined below can also be computed.

• 

A graph is represented by a special Maple procedure of type GRAPH. A graph is created by the command new() or by commands such as complete(), cycle(), or petersen(). Once created, the graph can be modified by using various commands. To create a copy of a graph, use the command duplicate(). Further modifications of the original graph will not affect the copy.

• 

To generate a random graph use random(). Either the number of vertices and the probability of an edge occurring, or the number of vertices and edges may be specified.

• 

You can add vertices and edges to the graph using the commands addvertex(), and addedge(). Vertex names are numeric by default but can be any valid Maple name. They have a default weight of 0. Edge names are taken from the sequence cate,1..m by default, but can be any name or string beginning with the letter `e`. Edges can be specified as sets or lists of vertices. A list indicates a directed edge, while a set indicates an undirected edge. Edges have a default weight of 1. Weights can be general Maple expressions.

• 

All deletions are handled by the delete() command.

• 

To determine properties of a given graph, G, use commands such as edges(G), or vertices(G).

List of networks Package Commands

• 

The following is a list of available commands

acycpoly

addedge

addvertex

allpairs

ancestor

arrivals

bicomponents

charpoly

chrompoly

complement

complete

components

connectivity

contract

countcuts

counttrees

cube

cycle

cyclebase

daughter

degreeseq

delete

departures

diameter

dinic

djspantree

dodecahedron

draw

draw3d

duplicate

edges

ends

eweight

flow

flowpoly

fundcyc

getlabel

girth

graph

graphical

gsimp

gunion

head

icosahedron

incidence

incident

indegree

induce

isplanar

maxdegree

mincut

mindegree

neighbors

new

octahedron

outdegree

path

petersen

random

rank

rankpoly

shortpathtree

show

shrink

span

spanpoly

spantree

tail

tetrahedron

tuttepoly

vdegree

vertices

void

vweight

 

 

• 

The commands in the above list include implementations of a number of basic routines including network flows, connectivity, disjoint spanning trees, all-pairs shortest path, single-source shortest path, minimum weight spanning tree, Tutte polynomials and special evaluations of them (rank, span, acyclicity, chromatic and flow polynomials), and characteristic polynomials.

• 

To display the help page for a particular networks command, see Getting Help with a Command in a Package.

Examples

Important: The networks package has been deprecated.  Use the superseding package GraphTheory instead.

withnetworks:

newG:

addvertex1,2,3,4,G

1,2,3,4

(1)

connect1,2,3,4,G

e1,e2,e3,e4

(2)

edgesG

e1,e2,e3,e4

(3)

connectivityG

2

(4)

countcutsG

6

(5)

drawG:

See Also

GraphTheory

UsingPackages

with