function A = digraph_arc_to_adj ( L )

%*****************************************************************************80
%
%% digraph_arc_to_adj() converts arc list digraph to an adjacency digraph.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    18 April 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer L(edge_num,2): the edge list.
%
%  Output:
%
%    integer A(node_num,node_num): the adjacency matrix.
%
  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;
  end

  return
end
