Macaulay2 » Documentation
Packages » Graphs :: degreeIn
next | previous | forward | backward | up | index | toc

degreeIn -- returns the "in-degree" of a vertex in a digraph

Synopsis

Description

In a directed graph, we define the degree into a vertex or the "in-degree" of a vertex to be the number of parents of that vertex. Intuitively, this give the number of edges that point into the vertex.

i1 : D = digraph({1,2,3,4},{{1,2},{2,3},{3,4},{4,2}});
i2 : degreeIn(D, 2)

o2 = 2

See also

Ways to use degreeIn :

For the programmer

The object degreeIn is a method function.