function value = variomino_equal ( p1, p2 )

%*****************************************************************************80
%
%% variomino_equal() determines if variominoes P1 and P2 are equal.
%
%  Discussion:
%
%    A polyomino is a shape formed by connecting unit squares edgewise
%
%    A variomino is a polyomino in which each square has been assigned
%    a value between 1 and v.
%
%    A variomino can be represented by an MxN matrix, whose entries are
%    between 1 and v for squares that are part of the variomino, 
%    and 0 otherwise.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 April 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer p1(m1,n1): the representation of variomino p1. 
%
%    integer p2(m2,n2): the representation of variomino P2. 
%
%  Output:
%
%    logical value: true if P1 and P2 represent the same variomino.
%
  [ m1, n1 ] = size ( p1 );
  [ m2, n2 ] = size ( p2 );

  if ( m1 ~= m2 )
    value = false;
  elseif ( n1 ~= n2 )
    value = false;
  else
    value = all ( all ( p1 == p2 ) );
  end

  return
end
