function legendre_linear_product_test ( p, e )

%*****************************************************************************80
%
%% legendre_linear_product_test() tests legendre_linear_product().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    09 May 2008
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer P, the maximum degree of the polynomial factors.
%
%    integer E, the exponent of X in the integrand.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'legendre_linear_product_test()\n' );
  fprintf ( 1, '  Compute a linearly weighted Legendre product table.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Tij = integral ( -1 <= X <= +1 ) X^E Li(X) Lj(X) dx\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  where Li(X) = Legendre polynomial of degree i.\n' );

  if ( nargin < 1 )
    fprintf ( 1, '\n' );
    p = input ( '  Enter maximum degree P so that 0 <= P.' );
  end

  if ( nargin < 2 )
    fprintf ( 1, '\n' );
    e = input ( '  Enter E, the exponent of X in the integrand.' );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Maximum degree P = %d\n', p );
  fprintf ( 1, '  Exponent of X, E = %d\n', e );

  table = legendre_linear_product ( p, e );

  r8mat_print ( p+1, p+1, table, '  Linearly weighted table:' );

  return
end
