function latin_cover_test02 ( )

%*****************************************************************************80
%
%% latin_cover_test02() tests latin_cover_2d().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 August 2012
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'latin_cover_test02():\n' );
  fprintf ( 1, '  Test latin_cover_2d().\n' );

  for n = 3 : 2 : 9

    for test = 1 : 3

      p = zeros ( 2, n );

      p(1,1:n) = randperm ( n );
 
      perm_print ( n, p(1,1:n), '  Permutation 1' );

      p(2,1:n) = randperm ( n );
 
      perm_print ( n, p(2,1:n), '  Permutation 2' );

      A = latin_cover_2d ( n, p);

      disp ( ' ' )
      disp ( '  Latin cover:' )
      disp ( ' ' )
      disp ( A )

    end

  end

  return
end
