function pagerank_test ( )

%*****************************************************************************80
%
%% pagerank_test tests pagerank.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    18 February 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../pagerank' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pagerank_test\n' );
  fprintf ( 1, '  MATLAB version.\n' );
  fprintf ( 1, '  Test pagerank.\n' );
%
%  Test 1
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'Test 1:\n' );
  fprintf ( 1, '  5 node graph with a cycle.\n' );

  n = 5;
  a = adj1 ( );
  a
  t = adj_to_transit ( n, a );
  t
  xy = xy1 ( );
  gplotdc ( a, xy );
  print ( '-dpng', 'graph1.png' );
  power_graph ( n, a );
  surf_graph ( n, a );
%
%  Test 2
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'Test 2:\n' );
  fprintf ( 1, '  16 node graph.\n' );
  
  n = 16;
  a = adj2 ( );
  a
  t = adj_to_transit ( n, a );
  t
  xy = xy2 ( );
  gplotdc ( a, xy );
  print ( '-dpng', 'graph2.png' );
  power_graph ( n, a );
  surf_graph ( n, a );
%
%  Test 3
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'Test 3:\n' );
  fprintf ( 1, '  6 node graph.\n' );

  n = 6;
  a = adj3 ( );
  a
  t = adj_to_transit ( n, a );
  t
  xy = xy3 ( );
  gplotdc ( a, xy );
  print ( '-dpng', 'graph3.png' );
  power_graph ( n, a );
  surf_graph ( n, a );
%
%  Test 4
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'Test 4:\n' );
  fprintf ( 1, '  6 node graph.\n' );

  n = 6;
  a = adj4 ( );
  a
  t = adj_to_transit ( n, a );
  t
  [ v1, l1 ] = eigs ( t )
  t * v1(1:6,6)
  xy = xy4 ( );
  gplotdc ( a, xy );
  print ( '-dpng', 'graph4.png' );
  power_graph ( n, a );
  surf_graph ( n, a );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'pagerank_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../pagerank' );

  return
end

