function A = graph_arc_to_adj ( L )

%*****************************************************************************80
%
%% graph_arc_to_adj() converts an arc list to an adjacency matrix.
%
%  Discussion:
%
%    Symmetry of the adjacency matrix is enforced.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    26 April 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer L(edge_num,2), the arc list for 
%    an undirected graph. 
%
%  Output:
%
%    integer A(node_num,node_num), the adjacency information.
%
  edge_num = size ( L, 1 );
  node_num = max ( max ( L ) );

  A = zeros ( node_num, node_num );

  for edge_id = 1 : edge_num
    i = L(edge_id,1);
    j = L(edge_id,2);
    A(i,j) = 1;
    A(j,i) = 1;
  end

  edge_num = nnz ( A );

  return
end
