networks
delete
delete edges or vertices from a graph
Calling Sequence
Parameters
Description
Examples
delete(Eset, G)
delete(Vset, G)
G
-
graph or network
Eset
edge or a set or list of edges
Vset
vertex or a set or list of vertices
Important: The networks package has been deprecated. Use the superseding commands GraphTheory[DeleteEdge] and GraphTheory[DeleteVertex] instead.
This procedure modifies the given graph G by deleting the indicated edges or vertices. In each case the modified graph is also available as the value of the procedure call.
Either sets of edges or sets of vertices may be deleted from the graph G. In either case, the graph structure, including edge and vertex weight tables and neighbor sets are updated.
If G must be preserved unmodified then use duplicate() to create a copy of the graph G prior to any use of delete().
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[delete](...).
with⁡networks:
G≔complete⁡5:
delete⁡3,4,G:
vertices⁡G,ends⁡G
1,2,5,1,2,1,5,2,5
delete⁡incident⁡5,G,G:
1,2,5,1,2
See Also
GraphTheory[DeleteEdge]
GraphTheory[DeleteVertex]
networks(deprecated)[complement]
networks(deprecated)[contract]
with
Download Help Document