function graph_adj_list_to_arc_test ( )

%*****************************************************************************80
%
%% graph_adj_list_to_arc_test() tests graph_adj_list_to_arc().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    27 April 2026
%
%  Author:
%
%    John Burkardt
%
  AP = [ ...
    1,  8, 12, 15, 17, 19, 21, 23, 26,  29, ...
   33, 35, 37, 39 ];

  AL = [ ...
    2, 3, 4, 5, 6, 7, 8, 1, 5, 6, ...
    8, 1, 4, 7, 1, 3, 1, 2, 1, 2, ...
    1, 3, 1, 2, 9, 8,10,13, 9,11, ...
   12,13,10,12,10,11, 9,10 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'graph_adj_list_to_arc_test():\n' );
  fprintf ( 1, '  graph_adj_list_to_arc() converts a graph adjacency list\n' );
  fprintf ( 1, '  representation of a graph to an arc list.\n' );

  edge_num = length ( AL );
  node_num = length ( AP ) - 1;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of edges is %d\n', edge_num );
  fprintf ( 1, '  Number of nodes is %d\n', node_num );

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

  L = graph_adj_list_to_arc ( AP, AL );

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

  return
end
