function digraph_adj_test ( )

%*****************************************************************************80
%
%% digraph_adj_test() tests digraph_adj().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    12 September 2024
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../digraph_adj' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'digraph_adj_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test digraph_adj().\n' );

  abc_inc_test ( );
  abcd_inc_test ( );
  five_inc_test ( );
  inc_to_google_test ( );
  inc_to_transition_test ( );
  moler_inc_test ( );
  sauer_inc_test ( );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'digraph_adj_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  timestamp ( );

  rmpath ( '../digraph_adj' );

  return
end
function abc_inc_test ( )

%*****************************************************************************80
%
%% abc_inc_test() tests abc_inc().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 September 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'abc_inc_test():\n' );
  fprintf ( 1, '  Test abc_inc()\n' );

  A = abc_inc ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  "abc" incidence matrix A:\n' );
  disp ( A );

  return
end
function abcd_inc_test ( )

%*****************************************************************************80
%
%% abcd_inc_test() tests abcd_inc().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 September 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'abcd_inc_test():\n' );
  fprintf ( 1, '  Test abcd_inc()\n' );

  A = abcd_inc ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  "abcd" incidence matrix A:\n' );
  disp ( A );

  return
end
function five_inc_test ( )

%*****************************************************************************80
%
%% five_inc_test() tests five_inc().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 September 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'five_inc_test():\n' );
  fprintf ( 1, '  Test five_inc()\n' );

  A = five_inc ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  "five" incidence matrix A:\n' );
  disp ( A );

  return
end
function inc_to_google_test ( )

%*****************************************************************************80
%
%% inc_to_google_test() tests inc_to_google().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 September 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' )
  fprintf ( 1, 'inc_to_google_test():\n' )
  fprintf ( 1, '  Test inc_to_google()\n' )

  A = [ ...
    0, 1, 0, 0 ; ...
    0, 0, 1, 0 ; ...
    1, 0, 0, 1 ; ...
    1, 0, 0, 0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Incidence matrix A:\n' );
  disp ( A );

  G = inc_to_google ( A );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Google transition matrix G:\n' );
  disp ( G );

  return
end
function inc_to_transition_test ( )

%*****************************************************************************80
%
%% inc_to_transition_test() tests inc_to_transition().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 September 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'inc_to_transition_test():\n' );
  fprintf ( 1, '  Test inc_to_transition()\n' );

  A = [ ...
    0, 1, 0, 0 ; ...
    0, 0, 1, 0 ; ...
    1, 0, 0, 1 ; ...
    1, 0, 0, 0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Incidence matrix A:\n' );
  disp ( A );

  T = inc_to_transition ( A );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Transition matrix T:\n' );
  disp ( T );

  return
end
function moler_inc_test ( )

%*****************************************************************************80
%
%% moler_inc_test() tests moler_inc().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 September 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'moler_inc_test():\n' );
  fprintf ( 1, '  Test moler_inc()\n' );

  A = moler_inc ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Moler incidence matrix A:\n' );
  disp ( A );

  return
end
function sauer_inc_test ( )

%*****************************************************************************80
%
%% sauer_inc_test() tests sauer_inc().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 September 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'sauer_inc_test()\n:' );
  fprintf ( 1, '  Test sauer_inc()\n' );

  A = sauer_inc ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Sauer incidence matrix A:\n' );
  disp ( A );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 November 2022
%
%  Author:
%
%    John Burkardt
%
  t = now ( );
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

