function graph_arc_to_adj_test ( )

%*****************************************************************************80
%
%% graph_arc_to_adj_test() tests graph_arc_to_adj().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    10 April 2026
%
%  Author:
%
%    John Burkardt
%
  inode = [ ...
    1, 1, 1, 1, 1, 1, 1, 2, 2, 2, ...
    2, 3, 3, 3, 4, 4, 5, 5, 6, 6, ...
    7, 7, 8, 8, 8, 9, 9, 9,10,10, ...
   10,10,11,11,12,12,13,13 ];
 
  jnode = [ ...
    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_arc_to_adj_test():\n' );
  fprintf ( 1, '  graph_arc_to_adj() converts a graph arc\n' );
  fprintf ( 1, '  representation of a graph to an adjacency matrix.\n' );

  edge_num = length ( inode ) ;
  node_num = max ( max ( inode ), max ( jnode ) );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of edges is %d\n', edge_num );
  fprintf ( 1, '  Number of nodes is %d\n', node_num );

  knode = [ inode; jnode ]';
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The arc list:\n' );
  disp ( knode );

  A = graph_arc_to_adj ( inode, jnode );

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

  return
end
