function [ m, n, nz, row, col, val ] = st_to_crs ( nst, ist, jst, Ast )

%*****************************************************************************80
%
%% st_to_crs() copies an ST matrix to CRS format.
%
%  Discussion:
%
%    The ST storage format stores, for each nonzero entry of a matrix,
%    the values I, J, and AIJ in separate vectors.
%
%    The CRS storage format stores the nonzero entries of row I in 
%    entries ROW(I) through ROW(I+1)-1 of VAL.  
%    COL(J) records the column index of the entry in VAL(J).
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    24 March 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer NST, the number of ST elements.
%
%    integer IST(NST), JST(NST), the ST rows and columns.
%
%    real Ast(NST), the ST values.
%
%  Output:
%
%    integer M, N: the order of the matrix.
%
%    integer NZ: the number of nonzero elements.
%
%    integer ROW(M+1): the nonzero offdiagonal elements 
%    of row I of A are contained in A(ROW(I)) through A(ROW(I+1)-1).
%
%    integer COL(NZ): the column indices of the nonzero elements of A.
%
%    real VAL(NZ): the nonzero elements of A.
%
  Age = st_to_ge ( nst, ist, jst, Ast );

  [ m, n, nz, row, col, val ] = ge_to_crs ( Age );

  return
end

