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

Online Help

All Products    Maple    MapleSim


GraphTheory

  

GraphUnion

  

construct graph union of graphs

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

GraphUnion(G1,...,Gs)

Parameters

G1,...,Gs

-

graphs

Description

• 

The GraphUnion function returns a graph G which is the union of the graphs G1,...,Gs, such that

• 

Note that the graphs G1,...,Gs must all be directed or all undirected, and the resulting graph is directed or undirected, respectively. Likewise, the graphs G1,...,Gs must all be weighted or all unweighted, and the resulting graph is then weighted or unweighted, respectively.

• 

Moreover, if G1,...,Gs are all weighted graphs, the resulting graph is a weighted graph where the weight of any common edge is the sum of the weights of that edge in G1,...,Gs.

Examples

(1)

(2)

(3)

(4)

(5)

In this example, note that the vertices of G1 and G2 are permuted differently.

(6)

(7)

(8)

(9)

(10)

(11)

In this example, note that there is one common vertex between the two graphs

(12)

(13)

(14)

(15)

(16)

See Also

CartesianProduct

DisjointUnion

GraphIntersection

GraphJoin

 


Download Help Document