networks(deprecated)/vdegree - Maple Help

networks

 vdegree
 finds vertex degrees in a graph

 Calling Sequence vdegree(vname, G)

Parameters

 G - graph or network vname - vertex

Description

 • Important: The networks package has been deprecated.Use the superseding package GraphTheory instead.
 • Given a vertex v the degree of v in G is returned.
 • Undirected and directed edges may both exist, but vdegree uses only the undirected edges. Use indegree() or outdegree() to determine the other kinds of degrees.
 • This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[vdegree](...).

Examples

Important: The networks package has been deprecated.Use the superseding package GraphTheory instead.

 > $\mathrm{with}\left(\mathrm{networks}\right):$
 > $\mathrm{new}\left(G\right):$
 > $\mathrm{addvertex}\left(1,2,3,4,G\right):$
 > $\mathrm{addedge}\left(\left[\left\{1,2\right\},\left\{1,2\right\},\left[1,2\right],\left[1,3\right],\left[4,1\right]\right],G\right):$
 > $\mathrm{vdegree}\left(1,G\right)$
 ${2}$ (1)
 > $\mathrm{indegree}\left(1,G\right)$
 ${1}$ (2)
 > $\mathrm{outdegree}\left(1,G\right)$
 ${2}$ (3)