function pi = compute_pi_msg(bnode, bnet, c)

switch bnode.type
  case {'adder', 'mux', 'mux2', 'noisyor', 'tabular'} % all the discrete types
    pi = compute_pi_msg_tabular(bnode, bnet, c);
  otherwise,
    error(['bad type ' bnode.type]);
end
