function ksubset_lex_rank_test ( )

%*****************************************************************************80
%
%% ksubset_lex_rank_test() tests ksubset_lex_rank().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 December 2015
%
%  Author:
%
%    John Burkardt
%
  k = 3;
  n = 5;

  fprintf ( 1, ' \n' );
  fprintf ( 1, 'ksubset_lex_rank_test():\n' );
  fprintf ( 1, '  ksubset_lex_rank() ranks K-subsets of an N set,\n' );
  fprintf ( 1, '  using the lexicographic ordering.\n' );

  t = [ 1, 4, 5 ];
  i4vec_transpose_print ( k, t, '  The element to be ranked:' );

  rank = ksubset_lex_rank ( k, n, t );

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

  return
end
