function h = predator_conserved ( rf )

%*****************************************************************************80
%
%% predator_conserved evaluates a conserved quantity.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    27 February 2020
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    George Lindfield, John Penny,
%    Numerical Methods Using MATLAB,
%    Second Edition,
%    Prentice Hall, 1999,
%    ISBN: 0-13-012641-1,
%    LC: QA297.P45.
%
%  Input:
%
%    real RF(:,2): the current solution variables, rabbits and foxes.
%
%  Output:
%
%    real H(:): the value of the conserved quantity.
%
  r = rf(:,1);
  f = rf(:,2);

  alpha = 2.0;
  beta = 1.0;
  gamma = 1.0;
  delta = 1.0;

  h = delta * r - gamma * log ( r ) + beta * f - alpha * log ( f );

  return
end

