function padua_weights_set_test ( )

%*****************************************************************************80
%
%% padua_weights_set_test() tests padua_weights_set().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 September 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'padua_weights_set_test():\n' );
  fprintf ( 1, '  padua_weights_set() looks up Padua weights in a table.\n' );
 
  for l = 3 : 4
    n = padua_order ( l );
    w1 = padua_weights ( l );
    w2 = padua_weights_set ( l );
    fprintf ( 1, '\n' );
    fprintf ( 1, '  Level %d  Padua weights\n', l );
    fprintf ( 1, '\n' );
    diff = 0.0;
    for j = 1 : n
      diff = max ( diff, abs ( w1(j) - w2(j) ) );
      fprintf ( 1, '  %4d  %14.6g  %14.6g\n', j, w1(j), w2(j) );
    end
    fprintf ( 1, '\n' );
    fprintf ( 1, '  Maximum difference = %g\n', diff );
  end

  return
end
