function graph_arc_to_adj_list_test ( )

%*****************************************************************************80
%
%% graph_arc_to_adj_list_test() tests graph_arc_to_adj_list().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    27 April 2026
%
%  Author:
%
%    John Burkardt
%
  L = [ ...
     1,     2; ...
     1,     3; ...
     1,     4; ...
     1,     5; ...
     1,     6; ...
     1,     7; ...
     1,     8; ...
     2,     1; ...
     2,     5; ...
     2,     6; ...
     2,     8; ...
     3,     1; ...
     3,     4; ...
     3,     7; ...
     4,     1; ...
     4,     3; ...
     5,     1; ...
     5,     2; ...
     6,     1; ...
     6,     2; ...
     7,     1; ...
     7,     3; ...
     8,     1; ...
     8,     2; ...
     8,     9; ...
     9,     8; ...
     9,    10; ...
     9,    13; ...
    10,     9; ...
    10,    11; ...
    10,    12; ...
    10,    13; ...
    11,    10; ...
    11,    12; ...
    12,    10; ...
    12,    11; ...
    13,     9; ...
    13,    10 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'graph_arc_to_adj_list_test():\n' );
  fprintf ( 1, '  graph_arc_to_adj_list() converts an arc list\n' );
  fprintf ( 1, '  to an adjacency list.\n' );

  edge_num = size ( L, 1 );
  node_num = max ( max ( L ) );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of nodes is %d\n', node_num );
  fprintf ( 1, '  Number of edges is %d\n', edge_num );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The arc list:\n' );
  disp ( L );

  [ AP, AL ] = graph_arc_to_adj_list ( L );

  graph_adj_list_print ( 'The adjacency list', AP, AL );

  return
end
