function dream_test ( )

%*****************************************************************************80
%
%% DREAM_TEST tests DREAM.
%
%  Discussion:
%
%    The DREAM program was originally developed by Guannan Zhang, of
%    Oak Ridge National Laboratory (ORNL); it has been incorporated into 
%    the DAKOTA package of Sandia National Laboratory, and is
%    intended to form part of the ORNL package known as TASMANIA.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    08 January 2019
%
%  Author:
%
%    Original FORTRAN90 version by Guannan Zhang.
%    MATLAB version by John Burkardt.
%
  addpath ( '../dream' );
  addpath ( '../pdflib' );
  addpath ( '../rnglib' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'DREAM_TEST:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test DREAM.\n' );

  dream ( @p0_size, @p0_value, @p0_prior_density, @p0_prior_sample, ...
    @p0_sample_likelihood );

  dream ( @p2_size, @p2_value, @p2_prior_density, @p2_prior_sample, ...
    @p2_sample_likelihood );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'DREAM_TEST:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../dream' );
  rmpath ( '../pdflib' );
  rmpath ( '../rnglib' );

  return
end
