function toep_cholesky_lower_test ( )

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

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

  r8mat_print ( 2, n, g, '  Compressed Toeplitz matrix G:' );

  l = toep_cholesky_lower ( n, g );
  r8mat_print ( n, n, l, '  Computed lower Cholesky factor L:' );

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

  return
end

