GraphTheory - Maple Programming Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Discrete Mathematics : Graph Theory : GraphTheory Package : GraphTheory/DeleteEdge

GraphTheory

  

DeleteEdge

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

DeleteEdge(G, E, ip)

Parameters

G

-

undirected graph

E

-

edge, trail, or set of edges

ip

-

(optional) equation of the form inplace=true or false

Description

• 

The DeleteEdge command deletes one or more edges from an undirected graph. By default, the original graph is changed to a graph missing the specified set of edges. By setting inplace=false the original graph remains unchanged and a new graph missing the specified set of edges is created.

• 

If the graph is a weighted graph, then if a weight is also provided (i.e. edge,weight instead of edge) that weight is subtracted from the edge weight, which will not necessarily remove the edge from the graph. If no weight is provided, the edge is removed regardless of the weight.

Examples

withGraphTheory:

GCycleGraph4

G:=Graph 1: an undirected unweighted graph with 4 vertices and 4 edge(s)

(1)

HDeleteEdgeG,1,2,inplace=false

H:=Graph 2: an undirected unweighted graph with 4 vertices and 3 edge(s)

(2)

EdgesG

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

(3)

EdgesH

1,4,2,3,3,4

(4)

DeleteEdgeG,1,2,3,4

Graph 1: an undirected unweighted graph with 4 vertices and 2 edge(s)

(5)

EdgesG

1,4,2,3

(6)

See Also

AddEdge

CycleGraph

DeleteArc

Edges

Graph

HasEdge

Trail

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam