function Age = ccs_to_ge ( m, n, nccs, iccs, cccs, Accs )

%*****************************************************************************80
%
%% ccs_to_ge() converts sparse matrix information from CCS to GE format.
% 
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    14 March 2026
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer M, the number of rows.
%
%    integer N, the number of columns.
%
%    integer NCCS, the number of elements.
%
%    integer ICCS(NCCS), the rows.
%
%    integer CCCS(N+1), the compressed columns.
%
%    real ACCS(NCCS), the values.
%
%  Output:
%
%    real AGE(M,N), the data stored in GE format.
%
  Age = zeros ( m, n );

  nst = 0;

  if ( cccs(1) == 0 )

    jlo = 0;
    jhi = n - 1;
  
    for j = jlo : jhi

      klo = cccs(j+1);
      khi = cccs(j+2) - 1;

      for k = klo : khi

        i = iccs(k+1);
        Age(i+1,j+1) = Accs(k+1);

      end

    end

  else

    jlo = 1;
    jhi = n;
  
    for j = jlo : jhi

      klo = cccs(j);
      khi = cccs(j+1) - 1;

      for k = klo : khi

        i = iccs(k);
        Age(i,j) = Accs(k);

      end

    end

  end

  return
end
