function r8vec_heap_a_test ( )

%*****************************************************************************80
%
%% R8VEC_HEAP_A_TEST tests R8VEC_HEAP_A.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 August 2018
%
%  Author:
%
%    John Burkardt
%
  n = 10;
  a_min = 0.0;
  a_max = 20.0;
  seed = 123456789;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8VEC_HEAP_A_TEST\n' );
  fprintf ( 1, '  R8VEC_HEAP_A puts an R8VEC into ascending heap form.\n' );

  [ a, seed ] = r8vec_uniform_ab ( n, a_min, a_max, seed );

  r8vec_print ( n, a, '  Unsorted array:' );
 
  a = r8vec_heap_a ( n, a );
 
  r8vec_print ( n, a, '  Ascending heap form:' );

  return
end
