function out=clusWeight(IDs,num);

if ~isempty(IDs),
	line=find(IDs(:,1)==num);
else
	line=[];
end

out=0;
if ~isempty(line),
	out=out+clusWeight(IDs,IDs(line,2));
	out=out+clusWeight(IDs,IDs(line,3));
else
	out=1;
end
