function i4row_sort_d_test ( )

%*****************************************************************************80
%
%% i4row_sort_d_test() tests i4row_sort_d().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 April 2009
%
%  Author:
%
%    John Burkardt
%
  m = 6;
  n = 4;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4row_sort_d_test():\n' );
  fprintf ( 1, '  i4row_sort_d() sorts the rows;\n' );
 
  for i = 1 : m
    for j = 1 : n
      a(i,j) = 10 * i + j;
    end
  end

  i4mat_print ( m, n, a, '  The original matrix:' );

  a = i4mat_perm2_uniform ( m, n, a );

  i4mat_print ( m, n, a, '  The matrix, permuted by I4MAT_PERM2_UNIFORM:' );

  a = i4row_sort_d ( m, n, a );

  i4mat_print ( m, n, a, '  The row-sorted matrix:' );

  a = i4row_sort2_d ( m, n, a );

  i4mat_print ( m, n, a, '  The element-sorted row-sorted matrix:' );

  return
end
