function r8vec_heap_d_test ( )

%*****************************************************************************80
%
%% R8VEC_HEAP_D_TEST tests R8VEC_HEAP_D.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL 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_D_TEST\n' );
  fprintf ( 1, '  R8VEC_HEAP_D puts an R8VEC into descending heap form.\n' );

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

  r8vec_print ( n, a, '  Unsorted array:' );
 
  a = r8vec_heap_d ( n, a );
 
  r8vec_print ( n, a, '  Descending heap form:' );

  return
end
