To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Revision:

root / _FullBNT / BNT / graph / neighbors.m @ 8:b5b38998ef3b

History | View | Annotate | Download (243 Bytes)

1
function ns = neighbors(adj_mat, i)
2
% NEIGHBORS Find the parents and children of a node in a graph.
3
% ns = neighbors(adj_mat, i)
4

    
5
%ns = myunion(children(adj_mat, i), parents(adj_mat, i));
6
ns = [find(adj_mat(i,:)) find(adj_mat(:,i))'];
7