function c8vec_sort_a_l1_test ( )

%*****************************************************************************80
%
%% c8vec_sort_a_l1_test() tests c8vec_sort_a_l1().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 March 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'c8vec_sort_a_l1_test():\n' );
  fprintf ( 1, '  c8vec_sort_a_l1() sorts a C8VEC by L1 norm.\n' );

  n = 10;
  a = c8vec_uniform_01 ( n );
 
  c8vec_print ( n, a, '  The unsorted vector:' );

  a = c8vec_sort_a_l1 ( n, a );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  I, A(I), |A(I)|\n' );
  fprintf ( 1, '\n' );

  for i = 1 : n
    fprintf ( 1, '  %2d  %s  %14.6g\n', ...
      i, num2str ( a(i) ), c8_norm_l1 ( a(i) ) );
  end

  return
end
