function s = closest_pair_brute_test01 ( n )

%*****************************************************************************80
%
%% closest_pair_brute_test01() tests the closest_pair_brute program.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 April 2024
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer n: the number of points.
%
%  Output:
%
%    real s: execution time in seconds.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'closest_pair_brute_test01():\n' );
  fprintf ( 1, '  closest_pair_brute() on a set of N points in 2D.\n' );

  x = rand ( n, 1 );
  y = rand ( n, 1 );
  z = complex ( x, y );

  tic ( );
  [ d, i, j ] = closest_pair_brute ( z );
  s = toc ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  n = %d\n', n );
  fprintf ( 1, '  time = %g seconds\n', s );
  fprintf ( 1, '  z(%d) = %g + %gi\n', i, real ( z(i) ), imag ( z(i) ) );
  fprintf ( 1, '  z(%d) = %g + %gi\n', j, real ( z(j) ), imag ( z(j) ) );
  fprintf ( 1, '  ||z(%d)-z(%d)|| = %g\n', i, j, d );

  return
end

