networks
edges
finds edges in a graph
Calling Sequence
Parameters
Description
Examples
edges(G)
edges(P, G)
edges(P, G, 'all')
G
-
graph or network
P
vertex pair, either in a set or list
Important: The networks package has been deprecated. Use the superseding command GraphTheory[Edges] instead.
This routine is used to request the names of the edges in a graph G.
If the only argument provided is the graph G then the names of all the edges in G are returned as a set.
The optional first argument P can be used to restrict the request for names to edges between a pair of vertices.
If P is the set {u, v} then the names of all the undirected edges between u and v are returned.
If P is a list, u,v, then the names of all the edges directed from u to v are returned.
The third option 'all' can be used to indicate that all of the edges between u and v, regardless of direction, are desired.
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[edges](...).
with⁡networks:
G≔complete⁡3:
edges⁡G
e1,e2,e3
addedge⁡1,2,G:
edges⁡1,2,G
e4
e1
edges⁡2,1,G
∅
edges⁡1,2,G,all
e1,e4
See Also
GraphTheory
GraphTheory[Edges]
networks(deprecated)[vertices]
with
Download Help Document