function bnet = mk_clpot(bnet, i, ass)
% MK_CLPOT Make an evidence-specific clique potential
% bnet = mk_clpot(bnet, i, ass)
%
% Make clique i, which has been assigned nodes 'ass'

% Set the clique potential to 1s
members = bnet.jtree.cliques{i};
bnet.jtree.clpot{i} = mk_potential(members, bnet);

% Multiply in the CPTs assigned to this clique
for j=1:length(ass)
  n = ass(j);
  pot = mk_pot_from_node(bnet, n);
  bnet.jtree.clpot{i} = multiply_by_potential(bnet.jtree.clpot{i}, pot);
end

