function hankel_pds_cholesky_lower_test01 ( )

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

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

  l = hankel_pds_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_pds_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;
  seed = 123456789;
  [ lii, seed ] = r8vec_uniform_01 ( n, seed );
  [ liim1, seed ] = r8vec_uniform_01 ( n - 1, seed );

  l = hankel_pds_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
