function polyomino_index_test ( )

%*****************************************************************************80
%
%% polyomino_index_test() tests polyomino_index().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 April 2018
%
%  Author:
%
%    John Burkardt
%
  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 ( 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

  return
end
