Indegree (source code)

= Indegree
{title2=$d^-(v)$}

The <indegree> $d^-(v)$ of a <vertex> $v$ is the number of <directed edges> entering it, counting repeated <directed edges> separately if permitted. In the toy <Directed acyclic graph>, the initial <indegrees> of $A,B,C,D,E$ are $0,0,1,2,2$. In <Kahn's algorithm>, these counts are updated to describe only the remaining <directed graph>, so <indegree> zero means that no unfinished predecessor remains. https://raw.githubusercontent.com/kevin-wayne/algs4/master/src/main/java/edu/princeton/cs/algs4/Digraph.java[Sedgewick and Wayne, Digraph: definition of indegree]{ref}