function graph_adj_to_arc_test ( )

%*****************************************************************************80
%
%% graph_adj_to_arc_test() tests graph_adj_to_arc().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    10 April 2026
%
%  Author:
%
%    John Burkardt
%
  A = [ ...
    0,1,1,1,1,1,1,1,0,0,0,0,0; ...
    1,0,0,0,1,1,0,1,0,0,0,0,0; ...
    1,0,0,1,0,0,1,0,0,0,0,0,0; ...
    1,0,1,0,0,0,0,0,0,0,0,0,0; ...
    1,1,0,0,0,0,0,0,0,0,0,0,0; ...
    1,1,0,0,0,0,0,0,0,0,0,0,0; ...
    1,0,1,0,0,0,0,0,0,0,0,0,0; ...
    1,1,0,0,0,0,0,0,1,0,0,0,0; ...
    0,0,0,0,0,0,0,1,0,1,0,0,1; ...
    0,0,0,0,0,0,0,0,1,0,1,1,1; ...
    0,0,0,0,0,0,0,0,0,1,0,1,0; ...
    0,0,0,0,0,0,0,0,0,1,1,0,0; ...
    0,0,0,0,0,0,0,0,1,1,0,0,0 ];

  node_num = size ( A, 1 );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'graph_adj_to_arc_test():\n' );
  fprintf ( 1, '  graph_adj_to_arc() converts an adjacency matrix\n' );
  fprintf ( 1, '  to an arc list.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The adjacency matrix:\n' );
  disp ( A );

  edge_num = sum ( sum ( A ) );

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

  L = graph_adj_to_arc ( A );

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

  return
end
