function prob = prob_bnode(bnode, bnet)
% PROB_BNODE (Dispatch) Compute Pr(observed self | observed parents) for a generic node.
% prob = prob_bnode(bnode, bnet)
%
% This is used in naive_discrete_marginal and likelihood_weighting.

switch bnode.type
  case 'gaussian',
    prob = prob_gaussian(bnode, bnet);
  case 'input',
    prob = prob_input(bnode, bnet);
  case 'logistic',
    prob = prob_logistic(bnode, bnet);
  case 'noisyfn',
    prob = prob_noisyfn(bnode, bnet);
  case 'noisyor',
    prob = prob_noisyor(bnode, bnet);
  case 'softmax',
    prob = prob_softmax(bnode, bnet);
  case 'tabular',
    prob = prob_tabular(bnode, bnet);
  otherwise, 
    error(['bad type' bnode.type]);
end

 
