function polyomino_monohedral_variants_test ( )

%*****************************************************************************80
%
%% POLYOMINO_MONOHEDRAL_VARIANTS_TEST tests POLYOMINO_MONOHEDRAL_VARIANTS.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 May 2018
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYOMINO_MONOHEDRAL_VARIANTS_TEST\n' );
  fprintf ( 1, '  POLYOMINO_MONOHEDRAL_VARIANTS determine the number of variants\n' );
  fprintf ( 1, '  of a polyomino.\n' );
  fprintf ( 1, '\n' );

  pentominos = [ 'F', 'I', 'L', 'N', 'P', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z' ];

  for i = 1 : 12

    name = pentominos(i);
    p = pentomino_matrix ( name );
    [ m, n ] = size ( p );
    label = sprintf ( '  Test polyomino %s', name );
    polyomino_print ( m, n, p, label );

    [ mn_num, mn_v, nm_num, nm_v ] = polyomino_monohedral_variants ( m, n, p );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  %s has %d (M,N) variants\n', name, mn_num );

    for k = 1 : mn_num
      label = sprintf ( '  (M,N) variant %d', k );
      polyomino_print ( m, n, mn_v(1:m,1:n,k), label );
    end

    fprintf ( 1, '\n' );
    fprintf ( 1, '%s has %d (N,M) variants\n', name, nm_num );

    for k = 1 : nm_num
      label = sprintf ( '  (N,M) variant %d\n', k );
      polyomino_print ( n, m, nm_v(1:n,1:m,k), label );
    end

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYOMINO_MONOHEDRAL_VARIANTS_TEST\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );
 
  return
end
