function e2 = edge_reflect ( e, r )

%*****************************************************************************80
%
%% edge_reflect() reflects a polyiamond described by its edge list.
%
%  Discussion:
%
%    The edge list of a polyiamond gives the IJ coordinates of the
%    boundary nodes, in counterclockwise order.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 November 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer E(EN,2): the edge list.
%
%    integer R: the reflection option.
%    0: no reflection;
%    1: reflect about the I axis;
%    2: reflect about the J axis;
%    3: reflect about both I and J axes.
%
%  Output:
%
%    integer E2(EN,2): the edge list for the reflected polyiamond.  
%
  e2 = e;

  if ( r == 1 )
    e2(:,1) = - e2(:,1) - e2(:,2);
  elseif ( r == 2 )
    e2(:,1) =   e2(:,1) + e2(:,2);
    e2(:,2) = - e2(:,2);
  elseif ( r == 3 )
    e2(:,1) = - e2(:,1);
    e2(:,2) = - e2(:,2);
  end

  return
end

