function value = gram_polynomial_inner_product ( i, j, m )

%*****************************************************************************80
%
%% gram_polynomial_inner_product(): inner product of two Gram polynomials.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 June 2019
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Germund Dahlquist, Ake Bjorck,
%    Numerical Methods in Scientific Computing,
%    Volume 1,
%    SIAM, 2008,
%    ISBN: 978-0-898716-44-3,
%    LC: QA297.D335 2008.
%    
%  Input:
%
%    integer i, j, the index of the polynomials.
%    i, j < m.
%
%    integer m, the number of points used in defining the polynomials.
%
%  Output:
%
%    real value, the value of the inner product.
%
  x = gram_abscissas ( m );
  gi = gram_polynomial_evaluate ( i, m, x );
  gj = gram_polynomial_evaluate ( j, m, x );
  value = gi' * gj / m;

  return
end

