function ge_to_crs_risk ( )

%*****************************************************************************80
%
%% ge_to_crs_risk converts the RISK matrix from GE to CRS format.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ge_to_crs_risk\n' );
  fprintf ( 1, '  Read a file defining the RISK matrix in GE format.\n' );
  fprintf ( 1, '  Use r8ge_to_r8crs() to convert it to CRS format.\n' );
  fprintf ( 1, '  Write files defining the RISK matrix in CRS format.\n' );
%
%  Read file of GE data.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Reading GE data file:\n' );
  fprintf ( 1, '    risk_ge.txt\n' );

  filename = 'risk_ge.txt';
  A = load ( filename ); 
%
%  Convert from R8GE to R8CRS.
%
  [ n, nz, row, col, val ] = r8ge_to_r8crs ( A );
%
%  Write CRS data to row, column, value files.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Creating CRS data files:\n' );
  fprintf ( 1, '    risk_row.txt\n' );
  fprintf ( 1, '    risk_col.txt\n' );
  fprintf ( 1, '    risk_val.txt\n' );

  i4vec_write ( 'risk_row.txt',n+1,row )
  i4vec_write ( 'risk_col.txt',nz,col )
  r8vec_write ( 'risk_val.txt',nz,val)

  return
end
