|
% Return the number of nodes, given an adjacency list, or adjacency matrix
|
|
% INPUTs: adjacency list: {i:j_1,j_2 ..} or adjacency matrix, ex: [0 1; 1 0]
|
|
% OUTPUTs: number of nodes, integer
|
|
%
|
|
% GB: last update Sep 19, 2012
|
|
|
|
function n = numNodes(adjL)
|
|
|
|
n = length(adjL); |