function st_to_ge_test01 ( )

%*****************************************************************************80
%
%% st_to_ge_test01() tests st_to_ge() using a tiny matrix.
%
%  Discussion:
%
%    This test uses a trivial matrix whose full representation is:
%
%          2  3  0  0  0
%          3  0  4  0  6
%      A = 0 -1 -3  2  0
%          0  0  1  0  0
%          0  4  2  0  1
%
%    A (1-based) ST representation, reading in order by rows is:
%
%      I  J   A
%     -- --  --
%      1  1   2
%      1  2   3
%
%      2  1   3
%      2  3   4
%      2  5   6
%
%      3  2  -1
%      3  3  -3
%      3  4   2
%
%      4  3   1
%
%      5  2   4
%      5  3   2
%      5  5   1
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 March 2026
%
%  Author:
%
%    John Burkardt
%
  nst = 12;

  Ast = [ ...
    2.0,  3.0, ...
    3.0,  4.0,  6.0, ...
   -1.0, -3.0,  2.0, ...
    1.0, ...
    4.0,  2.0,  1.0 ];
  ist = [ ...
    1, 1, ...
    2, 2, 2, ...
    3, 3, 3, ...
    4, ...
    5, 5, 5 ];
  jst = [ ...
    1, 2, ...
    1, 3, 5, ...
    2, 3, 4, ...
    3, ...
    2, 3, 5 ];
  m = 5;
  n = 5;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'st_to_ge_test01():\n' );
  fprintf ( 1, '  Convert a sparse matrix from ST to ge format.\n' );
  fprintf ( 1, '  st:  sparse triplet, I, J, AIJ.\n' );
  fprintf ( 1, '  ge:  general, A(1:M,1:N).\n' );

  i_min = min ( ist );
  i_max = max ( ist );
  j_min = min ( jst );
  j_max = max ( jst );
%
%  Print the ST matrix.
%
  title = 'The ST matrix:';
  st_header_print ( i_min, i_max, j_min, j_max, m, n, nst, title );
  st_print ( m, n, nst, ist, jst, Ast, title );
%
%  Convert.
%
  Age = st_to_ge ( nst, ist, jst, Ast );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The GE matrix:\n', nst );
  disp ( Age );

  return
end
