function r8po_ml_test ( )

%*****************************************************************************80
%
%% R8PO_ML_TEST tests R8PO_ML.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 August 2015
%
%  Author:
%
%    John Burkardt
%
  n = 10;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8PO_ML_TEST\n' );
  fprintf ( 1, '  R8PO_ML can compute A*x for an R8PO matrix A\n' );
  fprintf ( 1, '  even after it has been factored by R8PO_FA.\n' );

  for i = 1 : n
    for j = 1 : n
      a(i,j) = min ( i, j );
    end
  end
%
%  Set the desired solution.
%
  x = r8vec_indicator1 ( n );
%
%  Compute the corresponding right hand side.
%
  b = r8po_mv ( n, a, x );
%
%  Factor the matrix.
%
  [ a_lu, info ] = r8po_fa ( n, a );

  if ( info ~= 0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, '  Fatal error!\n' );
    fprintf ( 1, '  R8PO_FA declares the matrix is singular!\n' );
    fprintf ( 1, '  The value of INFO is %d\n', info );
    return
  end
%
%  Solve the linear system.
%
  x = r8po_sl ( n, a_lu, b );
 
  r8vec_print ( n, x, '  Solution:' );
%
%  Set the desired solution.
%
  x(1:n) = 1;
%
%  Compute the corresponding right hand side, using the factored matrix.
%
  b = r8po_ml ( n, a, x );
%
%  Solve the linear system.
%
  x = r8po_sl ( n, a, b );
 
  r8vec_print ( n, x, '  Solution:' );

  return
end
