function toeplitz_cholesky_lower_test ( )

%*****************************************************************************80
%
%% toeplitz_cholesky_lower_test() tests toeplitz_cholesky_lower().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 January 2017
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'toeplitz_cholesky_lower_test():\n' );
  fprintf ( 1, '  toeplitz_cholesky_lower() computes the lower Cholesky\n' );
  fprintf ( 1, '  factorization of a positive semi-definite Toeplitz matrix.\n' );
  fprintf ( 1, '  The matrix is supplied as an NxN array.\n' );

  n = 3;
  a = [ 1.0,   0.5, -0.375; ...
        0.5,   1.0,  0.5; ...
       -0.375, 0.5,  1.0 ];

  r8mat_print ( n, n, a, '  Toeplitz matrix A:' );

  l = toeplitz_cholesky_lower ( n, a );
  r8mat_print ( n, n, l, '  Computed lower Cholesky factor L:' );

  b = l * l';
  r8mat_print ( n, n, b, '  Product LL'':' );

  return
end

