Close
Close window
GraphIntersection - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.
Maplesoft logo
Maplesoft logo

Online Help

All Products Maple MapleSim


[フレーム] [フレーム]

GraphTheory

GraphIntersection

compute graph intersection of graphs

Calling Sequence

GraphIntersection(G1,...,Gs)

Parameters

G1,...,Gs

-

graphs

Description

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

VerticesG=VerticesG1VerticesGs

EdgesG=EdgesG1EdgesGs

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 weighted graphs, the resulting graph is a weighted graph where the weight of any edge is the minimum of the weights of that edge in G1,...,Gs.

Examples

>

withGraphTheory:

>

G1Graph5,1,2,1,3,1,4,1,5

G1Graph 1: an undirected graph with 5 vertices and 4 edges

(1)
>

G2Graph5,1,2,1,3,1,4,1,5,2,3,2,5,3,4,4,5

G2Graph 2: an undirected graph with 5 vertices and 8 edges

(2)
>

DrawGraphG1

>

DrawGraphG2

>

DrawGraphGraphIntersectionG1,G2

Compatibility

The GraphTheory[GraphIntersection] command was introduced in Maple 2018.

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


Download Help Document

AltStyle によって変換されたページ (->オリジナル) /