function pot = mk_pot_from_input(bnode, bnet)
% MK_POT_FROM_INPUT Make a potential from an input node.
% pot = mk_pot_from_input(bnode, bnet, discrete)

% assert(ismember(bnode.self, bnet.observed_nodes));
% might not be true if this node is a member of a undirected clique

switch bnet.jtree.pot_type
  case 'd',
    pot = mk_table(bnode.self, 1);
    pot.T = 1; % Pr(node) = 1
  case 'm',
    pot = mk_max_table(bnode.self, 1);
    pot.T = 1; % Pr(node) = 1
  case 'g',
    pot = mk_gpot(bnode.self, 0, 'c');
  case 'cg',
    pot = mk_cgpot([], bnode.self, [0 0], 'c');
  otherwise
    error('bad type');
end
