function initialize ( )

%*****************************************************************************80
%
%% initialize() initializes the random number generator library.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    31 March 2013
%
%  Author:
%
%    Original Pascal version by Pierre L'Ecuyer, Serge Cote.
%    MATLAB version by John Burkardt.
%
%  Reference:
%
%    Pierre LEcuyer, Serge Cote,
%    Implementing a Random Number Package with Splitting Facilities,
%    ACM Transactions on Mathematical Software,
%    Volume 17, Number 1, March 1991, pages 98-111.
%
  g_max = 32;
%
%  Remember that we have called INITIALIZE().
%
  initialized_set ( );
%
%  Initialize all generators to have FALSE antithetic value.
%
  value = 0;
  for g = 1 : g_max
    cgn_set ( g );
    antithetic_set ( value );
  end
%
%  Set the initial keys.
%
  ig1 = 1234567890;
  ig2 = 123456789;
  set_initial_key ( ig1, ig2 );
%
%  Initialize the current generator index to 1.
%
  g = 1;
  cgn_set ( g );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'INITIALIZE - Note:\n' );
  fprintf ( 1, '  The RNGLIB package has been initialized.\n' );

  return
end
