networks
graph
generate a graph from a specified set of vertices and edges
Calling Sequence
Parameters
Description
Examples
graph(vset, eset)
vset
-
set of vertex names
eset
set of pairs of vertex names
Important: The networks package has been deprecated. Use the superseding command GraphTheory[Graph] instead.
This procedure generates graphs directly from a set of vertices and a set of vertex pairs. Each pair of vertices is specified as either a list or a set. Use of a list indicates direction from the tail to the head.
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[graph](...).
with⁡networks:
G≔graph⁡1,2,1,2:
edges⁡G
e1
vertices⁡G
1,2
G≔graph⁡1,2,3,1,2,1,2,1,3,2,3:
e1,e2,e3,e4
Only one of these edges should be directed.
map⁡head,,G
2
See Also
GraphTheory
GraphTheory[Graph]
networks(deprecated)[addedge]
networks(deprecated)[addvertex]
with
Download Help Document