function ubvec_unrank_gray_test ( )

%*****************************************************************************80
%
%% UBVEC_UNRANK_GRAY_TEST tests UBVEC_UNRANK_GRAY.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    19 November 2015
%
%  Author:
%
%    John Burkardt
%
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'UBVEC_UNRANK_GRAY_TEST\n' );
  fprintf ( 1, '  UBVEC_UNRANK_GRAY unranks a UBVEC.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Rank  UBVEC\n' );
  fprintf ( 1, '\n' );
 
  for rank = 0 : 31
    ubvec = ubvec_unrank_gray ( rank, n );
    fprintf ( 1, '  %4d  ', rank );
    for j = 1 : n
      fprintf ( 1, '%2d', ubvec(j) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
