networks
adjacency
construct the adjacency matrix of a graph
Calling Sequence
Parameters
Description
Examples
adjacency(G)
G
-
graph or network
Important: The networks package has been deprecated. Use the superseding command GraphTheory[AdjacencyMatrix] instead.
Two vertices are said to be adjacent if one or more edges connect them. This routine constructs an adjacency matrix whose rows and columns are indexed by the vertices and whose i-jth entry is the number of edges from vertex i to vertex j.
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[adjacency](...).
with⁡networks:
G≔cycle⁡4:
adjacency⁡G
0101101001011010
G≔complete⁡4:
0111101111011110
addedge⁡2,3,G
e7
0111102112011110
addedge⁡1,2,G
e8
0211102112011110
See Also
GraphTheory
GraphTheory[AdjacencyMatrix]
networks(deprecated)[complete]
networks(deprecated)[incidence]
with
Download Help Document