function ll = log_likelihood_bnode(bnode)
% LOG_LIKELIHOOD_BNODE (Dispatch) Compute the contribution to the total expected log-likelihood of a generic node.
% ll = log_likelihood_bnode(bnode)

switch bnode.type
  case 'gaussian',
    ll = log_likelihood_gaussian(bnode);
  case 'input',
    ll = log_likelihood_input(bnode);
  case 'logistic',
    ll = log_likelihood_logistic(bnode);
  case 'noisyfn',
    ll = log_likelihood_noisyfn(bnode);
  case 'noisyor',
    ll = log_likelihood_noisyor(bnode);
  case 'softmax',
    ll = log_likelihood_softmax(bnode);
  case 'tabular',
    ll = log_likelihood_tabular(bnode);
  otherwise, 
    error(['bad type' bnode.type]);
end

 
