commands → indegree

indegree(A,i)

Given a directed graph A, the indegree command computes the sum of edge weights directed into a vertex i. This is the sum of weights in the i'th column.

Examples

A = [[2,4],[5,10]];
indegree(A,0);
	7