function ubvec_next_grlex_test ( )

%*****************************************************************************80
%
%% ubvec_next_grlex_test() tests ubvec_next_grlex().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    19 November 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'ubvec_next_grlex_test():\n' );
  fprintf ( 1, '  ubvec_next_grlex() computes unsigned binary vectors in GRLEX order.\n' );
  fprintf ( 1, '\n' );

  b(1:n) = 0;

  for i = 0 : 16
    fprintf ( 1, '  %2d:  ', i );
    for j = 1 : n
      fprintf ( 1, '%d', b(j) );
    end
    fprintf ( 1, '\n' );
    b = ubvec_next_grlex ( n, b );
  end

  return
end
