function ge_to_st_test01 ( )

%*****************************************************************************80
%
%% ge_to_st_test01() tests ge_to_st() 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
%
  m = 5;
  n = 5;
  Age = [ ...
    2,  3,  0,  0,  0; ...
    3,  0,  4,  0,  6; ...
    0, -1, -3,  2,  0; ...
    0,  0,  1,  0,  0; ...
    0,  4,  2,  0,  1 ];

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

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The GE matrix:\n' );
  disp ( Age );
%
%  Convert.
%
  [ nst, ist, jst, Ast ] = ge_to_st ( Age );
%
%  Print the ST matrix.
%
  title = 'The ST matrix:';
  st_print ( m, n, nst, ist, jst, Ast, title );

  return
end
