function tree_rank_test ( )

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

  fprintf ( 1, ' \n' );
  fprintf ( 1, 'TREE_RANK_TEST\n' );
  fprintf ( 1, '  TREE_RANK ranks trees.\n' );

  n = 4;

  t = [ 4, 3, 3;
        1, 2, 1 ];

  i4mat_print ( 2, n - 1, t, '  The element:' );

  rank = tree_rank ( n, t );

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

  return
end
