function partition_greedy_test ( )

%*****************************************************************************80
%
%% partition_greedy_test() tests partition_greedy().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 October 2022
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../partition_greedy' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'partition_greedy_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test partition_greedy().\n' );

  test_num = 5;
%
%  Find individual solutions.
%
  for test = 1 : test_num

    if ( test == 1 )
      w = [ 19; 17; 13; 9; 6 ];
    elseif ( test == 2 )
      w = [ 484; 114; 205; 288; 506; 503; 201; 127; 410 ];
    elseif ( test == 3 )
      w = [ 771; 121; 281; 854; 885; 734; 486; 1003; 83; 62 ];
    elseif ( test == 4 )
      w = [ 2; 10; 3; 8; 5; 7; 9; 5; 3; 2 ];
    elseif ( test == 5 )
      w = [ 3; 4; 3; 1; 3; 2; 3; 2; 1 ];
    end

    partition_greedy_test01 ( w );

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

  rmpath ( '../partition_greedy' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

