function subset_lex_rank_test ( )

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

  fprintf ( 1, ' \n' );
  fprintf ( 1, 'SUBSET_LEX_RANK_TEST\n' );
  fprintf ( 1, '  SUBSET_LEX_RANK ranks subsets of a set,\n' );
  fprintf ( 1, '  using the lexicographic ordering.\n' );

  t = [ 0, 1, 0, 1, 0 ];
  i4vec_transpose_print ( n, t, '  The element:' );

  rank = subset_lex_rank ( n, t );

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

  return
end
