function dist = cond_dist_bnode(bnode, bnet)
% COND_DIST_BNODE (Dispatch) Return Pr(self|observed parents) for a generic node.
% dist = cond_dist_bnode(bnode, bnet)

switch bnode.type
  case 'gaussian',
    dist = cond_dist_gaussian(bnode, bnet);
  case 'input',
    dist = cond_dist_input(bnode, bnet);
  case 'logistic',
    dist = cond_dist_logistic(bnode, bnet);
  case 'noisyfn',
    dist = cond_dist_noisyfn(bnode, bnet);
  case 'noisyor',
    dist = cond_dist_noisyor(bnode, bnet);
  case 'softmax',
    dist = cond_dist_softmax(bnode, bnet);
  case 'tabular',
    dist = cond_dist_tabular(bnode, bnet);
  otherwise, 
    error(['bad type' bnode.type]);
end

 
