GraphTheory
Degree
compute degree of vertex
InDegree
compute in-degree of vertex
OutDegree
compute out-degree of vertex
Calling Sequence
Parameters
Description
Examples
Degree(G, v)
InDegree(H, v)
OutDegree(H, v)
G
-
directed or undirected graph
H
directed graph
v
vertex
Degree returns the degree of v; that is, the number of edges of the graph G which are incident to v. The directions of the edges are ignored.
InDegree returns the in-degree of v; that is, the number of arcs directed into v.
OutDegree returns the out-degree of v; that is, the number of arcs directed out of v.
To find the vertices which are the tails of arcs directed into v, use GraphTheory[Arrivals].
To find the vertices which are the heads of arcs directed out of v, use GraphTheory[Departures].
with⁡GraphTheory:
G≔Digraph⁡Trail⁡1,2,3,4,2
G≔Graph 1: a directed graph with 4 vertices and 4 arc(s)
DrawGraph⁡G
Degree⁡G,2
3
InDegree⁡G,2
2
OutDegree⁡G,2
1
See Also
DegreeSequence
DrawGraph
IsRegular
MaximumDegree
MinimumDegree
Trail
UnderlyingGraph
Download Help Document