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

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : networks(deprecated)/gunion

networks

  

gunion

  

union of two graphs

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

gunion(G, H)

gunion(G, H, 'SIMPLE')

Parameters

G

-

graph or network

H

-

graph or network

'SIMPLE'

-

(optional) indicates that simple union wanted

Description

• 

Important: The networks package has been deprecated.  Use the superseding command GraphTheory[GraphUnion] instead.

• 

This procedure creates a graph whose vertex set is the usual set-theoretic union of the vertex sets of G and H, and which has an edge for each edge of G and for each edge of H.

• 

Multiple edges that have the same endpoints are retained unless 'SIMPLE' is specified, in which case multiple edges are reduced to a single edge.

• 

This routine is normally loaded by using the command with(networks), but it may also be referenced by using the full name networks[gunion](...).

Examples

Important: The networks package has been deprecated.  Use the superseding command GraphTheory[GraphUnion] instead.

withnetworks:

Gcompletea1,a2,a3,a4:

Hcomplete2,3:

Jvoid2,4,a1,a2:

addedgeCyclea1,a2,2,4,J:

UgunionG,J:

endsopedgesU,U

a1,a2,4,a1,a1,a3,a1,a4,a2,a3,a2,a4,a3,a4,a1,a2,2,a2,2,4

(1)

UgunionU,H,SIMPLE:

verticesU

1,2,3,4,5,a1,a2,a3,a4

(2)

endsopedgesU,U

1,3,a1,a3,a1,a4,a2,a3,a2,a4,a3,a4,1,4,1,5,2,3,2,4,2,5,2,a2,4,a1,a1,a2

(3)

See Also

GraphTheory

GraphTheory[GraphUnion]

networks(deprecated)[complete]

with