function [P1, lik] = normalize_potential(P1)
% NORMALIZE_POTENTIAL (Dispatch) Normalize a generic potential.
% [P1, lik] = normalize_potential(P1)

switch P1.type
  case 'd',
    [P1, lik] = normalize_table(P1);
  case 'm',
    [P1, lik] = normalize_max_table(P1);
  case 'g',
    [P1, lik] = normalize_gpot(P1);
  case 'cg',
    [P1, lik] = normalize_cgpot(P1);
  otherwise
    error(['bad type ' P1.type]);
end
