function [ t, ix0, ix1 ] = r8_random_init ( n, t, ix0, ix1 )

%*****************************************************************************80
%
%% R8_RANDOM_INIT initializes data for R8_RANDOM.
%
%  Discussion:
%
%    Before calling R8_RANDOM the first time, call R8_RANDOM_INIT
%    in order to initialize the T array.
%
%  Modified:
%
%    09 May 2016
%
%  Author:
%
%    This version by John Burkardt.
%
%  Reference:
%
%    Carter Bays, Stephen Durham,
%    Improving a Poor Random Number Generator,
%    ACM Transactions on Mathematical Software,
%    Volume 2, Number 1, March 1976, pages 59-64.
%
%  Input:
%
%    integer N, the number of random numbers in an auxiliary table.
%
%    real T(N+1), an array of random numbers.
%
%    integer IX0, IX1, two parameters used as seeds for the 
%    random number generator.  On first call, these might both 
%    be set to 0.
%
%  Output:
%
%    real T(N+1), an array of random numbers.
%
%    integer IX0, IX1, updated seeds for the random number generator.
%
  r = 0.0;

  for i = 1 : n + 1
    [ t(i), ix0, ix1 ] = r8_rand ( r, ix0, ix1 );
  end

  return
end
