commands → outdegree

outdegree(A,i)

Given a directed graph A, the outdegree command computes the sum of edge weights directed out of a vertex i. This is the sum of weights in the i'th row.

Examples

A = [[2,4],[5,10]];
outdegree(A,0);
	6