function graph_dist_all_test ( )

%*****************************************************************************80
%
%% graph_dist_all_test() tests graph_dist_all().
%
%  The graph is:
%
%  N3 --3-- N2 --4-- N4 --5-- N5
%
%     \      |      /
%       6    2     1
%        \   |    /
%
%            N1
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    06 November 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'graph_dist_all_test():\n' );
  fprintf ( 1, '  graph_dist_all() computes the distance between\n' );
  fprintf ( 1, '  all pairs of nodes.\n' );
  fprintf ( 1, '\n' );

  nnode = 5;

  dinfin = 1000.0;
 
  dist = Inf * ones ( nnode, nnode );

  for i = 1 : nnode
    dist(i,i) = 0.0;
  end
 
  dist(1,2) = 2.0;
  dist(1,3) = 6.0;
  dist(1,4) = 1.0;

  dist(2,1) = 2.0;
  dist(2,3) = 3.0;
  dist(2,4) = 4.0;

  dist(3,1) = 6.0;
  dist(3,2) = 3.0;

  dist(4,1) = 1.0;
  dist(4,2) = 4.0;
  dist(4,5) = 5.0;

  dist(5,4) = 5.0;
 
  graph_dist_print ( dist, nnode, '  Immediate node distance matrix:' );

  path_dist = graph_dist_all ( dist, nnode );
 
  graph_dist_print ( path_dist, nnode, '  Total node distance matrix:' );
 
  return
end
