function monotone_vector_next_test ( )

%*****************************************************************************80
%
%% monotone_vector_next_test() tests monotone_vector_next().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 October 2022
%
%  Author:
%
%    John Burkardt
%
  d = 3;
  b = 3;
  more = false;
  fprintf ( 1, '\n' );
  fprintf ( 1, 'monotone_vector_next_test():\n' );
  fprintf ( 1, '  monotone_vector_next() generates monotonically increasing integer\n' );
  fprintf ( 1, '  vectors of length D, with entries between 1 and B,\n' );
  fprintf ( 1, '  in lexicographic order.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The dimension d = %d\n', d );
  fprintf ( 1, '  The base b =      %d\n', b );
  fprintf ( 1, '\n' );
  
  a = [];
  i = 0;
  
  while ( true )

    [ a, more ] = monotone_vector_next ( d, b, a, more );

    if ( ~ more )
      break
    end

    i = i + 1;
    fprintf ( 1, '  %d:  ', i );
    disp ( a )

  end

  return
end
