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

Online Help

All Products    Maple    MapleSim


GraphTheory

  

SeidelSwitch

  

construct Seidel switch graph from graph

 

Calling Sequence

Parameters

Options

Description

Examples

Calling Sequence

SeidelSwitch(G, S, opts)

Parameters

G

-

undirected and unweighted graph

S

-

list of vertices of the graph

opts

-

one or more options as specified below

Options

• 

inplace=truefalse

  

Specifies whether the changes are applied to the original graph or to a copy. The default is true, meaning the original graph is changed.

Description

• 

The SeidelSwitch command transforms the input graph to a new graph in such a way that, for each specified vertex, its neighbors become its non-neighbors and vice versa.

• 

By default, the original graph is changed and the switching happens in place. By setting inplace=false the original graph remains unchanged.

Examples

withGraphTheory:

GCycleGraph5

GGraph 1: an undirected graph with 5 vertices and 5 edge(s)

(1)

DrawGraphG

NeighborsG,1

2,5

(2)

HSeidelSwitchG,1,2,inplace=false

HGraph 2: an undirected graph with 5 vertices and 7 edge(s)

(3)

NeighborsH,1

2,3,4

(4)

Vertices 1 and 2 remain neighbors of each other

DrawGraphH

EdgesH

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

(5)

SeidelSwitchG,1,2

Graph 1: an undirected graph with 5 vertices and 7 edge(s)

(6)

EdgesG

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

(7)

See Also

Neighbors