function floyd_test01 ( )

%*****************************************************************************80
%
%% floyd_test01() tests floyd().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 March 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'floyd_test01():\n' );
  fprintf ( 1, '  floyd() uses Floyd''s algorithm to find the\n' );
  fprintf ( 1, '  shortest distance between all pairs of nodes\n' );
  fprintf ( 1, '  in a directed graph, starting from the initial array\n' );
  fprintf ( 1, '  of direct node-to-node distances.\n' );

  n = 6;

  A = [ ...
    0.0, 2.0, 5.0, Inf, Inf, Inf; ...
    Inf, 0.0, 7.0, 1.0, Inf, 8.0; ...
    Inf, Inf, 0.0, 4.0, Inf, Inf; ...
    Inf, Inf, Inf, 0.0, 3.0, Inf; ...
    Inf, Inf, 2.0, Inf, 0.0, 3.0; ...
    Inf, 5.0, Inf, 2.0, 4.0, 0.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Node-to-node one-step distance array:\n' );
  disp ( A )

  B = floyd ( A );

  fprintf ( 1, '  Node-to-node shortest total distance array:\n' );
  disp ( B )

  return
end
