function graph_adj_random_test ( )

%*****************************************************************************80
%
%% graph_adj_random_test() tests graph_adj_random().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    30 August 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'graph_adj_random_test():\n' );
  fprintf ( 1, '  graph_adj_random() returns a random graph, for which the\n' );
  fprintf ( 1, '  probability of an edge between nodes I and J is PROB.\n' );

  node_num = 100;
  graph_id = 0;

  for prob = [ 0.25, 0.50, 0.75 ]
    graph_id = graph_id + 1;
    A = graph_adj_random ( node_num, prob );
    edge_num = sum ( sum ( A ) ) / 2.0;
    edge_max = ( node_num * ( node_num - 1 ) ) / 2.0;
    fprintf ( 1, '\n' );
    fprintf ( 1, '  Random graph #%d\n', graph_id );
    fprintf ( 1, '  node_num = %d\n', node_num );
    fprintf ( 1, '  edge_num = %d\n', edge_num );
    fprintf ( 1, '  edge_max = %d\n', edge_max );
    fprintf ( 1, '  ratio    = %g\n', edge_num / edge_max );
    fprintf ( 1, '  prob     = %g\n', prob );
  end

  return
end

