% test if a given edge is in the boundary

function out=in_bdy(a,b,B)
out=0;
K=size(B,1);
for k=1:K
if (a==B(k,1))&(b==B(k,2))
out=1;
elseif (b==B(k,1))&(a==B(k,2))
out=1;
end
end % for k
return