function i4row_sort_rotate_ascending_test ( )

%*****************************************************************************80
%
%% i4row_sort_rotate_ascending_test() tests i4row_sort_rotate_ascending().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    21 February 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4row_sort_rotate_ascending_test():\n' );
  fprintf ( 1, '  i4row_sort_rotate_ascending_test() sorts each row of an,\n' );
  fprintf ( 1, '  integer matrix, with respect to the lexicographic order,\n' );
  fprintf ( 1, '  using only rotations of vector substrings.\n' );

  A = [ ...
    1, 2, 3, 4; ...
    3, 1, 4, 2; ...
    9, 8, 0, 3; ...
    2, 9, 2, 4; ...
    8, 7, 1, 9 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Matrix A:\n' );
  disp ( A );

  A2 = i4row_sort_rotate_ascending ( A );

  fprintf ( 1, '  Matrix A after row sorting:\n' );
  disp ( A2 );

  return
end

