function quality_test_a ( )

%*****************************************************************************80
%
%% quality_test_a() tests quality() for points in the unit hypercube.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 November 2008
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'quality_test_a():\n' );
  fprintf ( 1, '  Test quality() on points in the unit hypercube.' );

  ns = 100000;
  input_filename = 'halton_02_00100.txt';

  [ n, ndim ] = r8mat_header_read ( input_filename );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  The pointset was read from "%s"\n', input_filename );
  fprintf ( 1, '  The sample routine is SAMPLE_HYPERCUBE_UNIFORM.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The spatial dimension NDIM =     %12d\n', ndim      );
  fprintf ( 1, '  The number of points N =	   %12d\n', n         );
  fprintf ( 1, '  The number of sample points NS = %12d\n', ns        );
  fprintf ( 1, '\n' );

  z = r8mat_data_read ( input_filename, n, ndim );

  r8mat_print_some ( n, ndim, z, 1, 1, 5, 5, ...
    '  5x5 portion of data read from file:' );
%
%  For 2 dimensional datasets, some quality measures work from the Delaunay triangulation.
%  Compute that here.
%
  if ( ndim == 2 )

    triangle = delaunay ( z(1,1:n), z(2,1:n) );

    triangle = triangle';
    nt = size ( triangle, 2 );

  else

    triangle = [];
    nt = 0;

  end

  if ( ndim == 2 )
    alpha_measure_test ( ndim, n, z, nt, triangle );
  end
  beta_measure_test ( ndim, n, z );
  chi_measure_test ( ndim, n, z, ns, 'sample_hypercube_uniform' );
  d_measure_test ( ndim, n, z, ns, 'sample_hypercube_uniform' );
  e_measure_test ( ndim, n, z, ns, 'sample_hypercube_uniform' );
  quality_test04 ( ndim, n, z );
  quality_test05 ( ndim, n, z, ns, 'sample_hypercube_uniform' );
  quality_test06 ( ndim, n, z );
  quality_test07 ( ndim, n, z, ns, 'sample_hypercube_uniform' );
  quality_test08 ( ndim, n, z, ns, 'sample_hypercube_uniform' );
  if ( ndim == 2 )
    quality_test083 ( ndim, n, z, nt, triangle );
  end
  quality_test085 ( ndim, n, z );
  quality_test09 ( ndim, n, z );
  quality_test10 ( ndim, n, z, ns, 'sample_hypercube_uniform' );
  quality_test11 ( ndim, n, z );

  return
end
