function bnet = mk_ev_specific_pot(bnet, assignments)
% MK_EV_SPECIFIC_POT Make evidence-specific clique potentials.
% bnet = mk_ev_specific_pot(bnet)
%
% assignments{c} are the nodes whose (evidence-specific) CPDs should be multiplied on to clique  c.
% (All nodes will be assigned except when we are updating a 2-slice DBN.)
% The evidence is stored in bnet.values.


% Set the separator potentials to 1s
[is,js] = find(bnet.jtree.adj_mat > 0);
for k=1:length(is)
  i = is(k); j = js(k); s = bnet.jtree.sep_index(i,j);
  members = bnet.jtree.separator{s};
  bnet.jtree.seppot{s} = mk_potential(members, bnet);
end

% Create the clique potentials
num_cliques = length(bnet.jtree.cliques);
for i=1:num_cliques
  bnet = mk_clpot(bnet, i, assignments{i});
end

