function hankel_spd_cholesky_lower_test01 ( )

%*****************************************************************************80
%
%% hankel_spd_cholesky_lower_test01 tests hankel_spd_cholesky_lower.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 January 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'hankel_spd_cholesky_lower_test01\n' );
  fprintf ( 1, '  hankel_spd_cholesky_lower computes a lower Cholesky\n' );
  fprintf ( 1, '  matrix L such that the matrix H = L * L'' is a\n' );
  fprintf ( 1, '  symmetric positive definite (SPD) Hankel matrix.\n' );

  n = 5;
  lii = ones ( n, 1 );
  liim1 = ones ( n - 1, 1 );

  l = hankel_spd_cholesky_lower ( n, lii, liim1 );

  r8mat_print ( n, n, l, '  The Cholesky factor L:' );

  h = l * l';

  r8mat_print ( n, n, h, '  The Hankel matrix H = L * L'':' );

  n = 5;
  lii = 1 : n;
  liim1 = n - 1 : -1 : 1;

  l = hankel_spd_cholesky_lower ( n, lii, liim1 );

  r8mat_print ( n, n, l, '  The Cholesky factor L:' );

  h = l * l';

  r8mat_print ( n, n, h, '  The Hankel matrix H = L * L'':' );

  n = 5;
  lii = rand ( n, 1 );
  liim1 = rand ( n - 1, 1 );

  l = hankel_spd_cholesky_lower ( n, lii, liim1 );

  r8mat_print ( n, n, l, '  The Cholesky factor L:' );

  h = l * l';

  r8mat_print ( n, n, h, '  The Hankel matrix H = L * L'':' );

  return
end
