function polyomino_index_test ( )

%*****************************************************************************80
%
%% polyomino_index_test tests polyomino_index.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    27 February 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../polyomino_index' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polyomino_index_test\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test polyomino_index,\n' );
  fprintf ( 1, '  which 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 ( );

  rmpath ( '../polyomino_index' );

  return
end
