function pruefer_rank_test ( )

%*****************************************************************************80
%
%% PRUEFER_RANK_TEST tests PRUEFER_RANK.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    23 December 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;

  fprintf ( 1, ' \n' );
  fprintf ( 1, 'PRUEFER_RANK_TEST\n' );
  fprintf ( 1, '  PRUEFER_RANK ranks Pruefer codes.\n' );

  p = [ 3, 1 ];
  i4vec_transpose_print ( n - 2, p, '  Element to be ranked:' );

  rank = pruefer_rank ( n, p );

  fprintf ( 1, ' \n' );
  fprintf ( 1, '  The rank of the element is computed as %d:\n', rank );

  return
end
