function graph_adj_print ( A, title )

%*****************************************************************************80
%
%% graph_adj_print() prints an adjacency matrix.
%
%  Discussion:
%
%    This routine actually allows the entries of ADJ to have ANY value.
%    Values between 0 and 9 will be printed as is.  Other values will
%    be printed as '*'.
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    15 March 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer A(node_num,npde_num): the adjacency matrix.  
%
%    character ( len = * ) TITLE: a title.
%
  node_num = size ( A, 1 );

  if ( 0 < length ( title ) )
    fprintf ( 1, '\n' );
    fprintf ( 1, '%s\n', title )
  end

  fprintf ( 1, '\n' );

  for i = 1 : node_num

    fprintf ( 1, '  %3d: ', i );
    
    for j = 1 : node_num

      if ( 0 <= A(i,j) && A(i,j) <= 9 )
        fprintf ( 1, '%d', A(i,j) );
      else
        fprintf ( 1, '*' );
      end
    end

    fprintf ( 1, '\n' );

  end

  return
end
