function graph_adj_distance_from_node_test ( )

%*****************************************************************************80
%
%% graph_adj_distance_from_node_test() tests graph_adj_distance_from_node().
%
%  Diagram:
%
%    5--2--10--1--3--6
%           |  |  | /
%           8  |  9
%           |  |  
%           4--7  
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    11 March 2023
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'graph_adj_distance_from_node_test():\n' );
  fprintf ( 1, '  graph_adj_distance_from_node() computes the distance\n' );
  fprintf ( 1, '  from one node to all other nodes in a graph;\n' );

  A = [ ...
    0,0,1,0,0,0,1,0,0,1; ...
    0,0,0,0,1,0,0,0,0,1; ...
    1,0,0,0,0,1,0,0,1,0; ...
    0,0,0,0,0,0,1,1,0,0; ...
    0,1,0,0,0,0,0,0,0,0; ...
    0,0,1,0,0,0,0,0,1,0; ...
    1,0,0,1,0,0,0,0,0,0; ...
    0,0,0,1,0,0,0,0,0,1; ...
    0,0,1,0,0,1,0,0,0,0; ...
    1,1,0,0,0,0,0,1,0,0 ];
   
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The graph adjacency matrix:\n' );
  disp ( A )

  node_k = 7;
  distance = graph_adj_distance_from_node ( A, node_k );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Distance from node %d:\n', node_k );
  disp ( distance )
 
  return
end
