function bnode = maximize_params_bnode(bnode)
% MAXIMIZE_PARAMS_BNODE (Dispatch )Set the parameters of a generic node to their ML/MAP values.
% bnode = maximize_params_bnode(bnode)

switch bnode.type
  case 'gaussian',
    bnode = maximize_params_gaussian(bnode);
  case 'input',
    bnode = maximize_params_input(bnode);
  case 'logistic',
    bnode = maximize_params_logistic(bnode);
  case 'noisyfn',
    bnode = maximize_params_noisyfn(bnode);
  case 'noisyor',
    bnode = maximize_params_noisyor(bnode);
  case 'softmax',
    bnode = maximize_params_softmax(bnode);
  case 'tabular',
    bnode = maximize_params_tabular(bnode);
  otherwise, 
    error(['bad type' bnode.type]);
end

 
