function polyomino_index_test ( )

%*****************************************************************************80
%
%% POLYOMINO_INDEX_TEST tests POLYOMINO_INDEX.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    28 April 2018
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYOMINO_INDEX_TEST\n' );
  fprintf ( 1, '  POLYOMINO_INDEX assigns an index to each nonzero entry\n' );
  fprintf ( 1, '  of a polyomino.\n' );

  p = [ ...
    1, 0, 1, 1;
    1, 1, 1, 0;
    0, 1, 1, 0 ];

  [ m, n ] = size ( p );

  polyomino_print ( m, n, p, '  The polyomino P:' );

  pin = polyomino_index ( p );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  PIN: Index vector for P:\n' );
  fprintf ( 1, '\n' );
  for i = 1 : m
    for j = 1 : n
      fprintf ( 1, ' %d', pin(i,j) );
    end
    fprintf ( 1, '\n' );
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYOMINO_INDEX_TEST\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  return
end
