function candy_count_vector_test( )

%*****************************************************************************80
%
%% candy_count_vector_test() tests candy_count_vector().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 May 2025
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'candy_count_vector_test():\n' );
  fprintf ( 1, '  candy_count_vector() counts candy types in a vector.\n' );
  fprintf ( 1, '  There are N entries in the vector A().\n' );
  fprintf ( 1, '  There are C candy types.\n' );
  fprintf ( 1, '  Candy types are assigned cyclically to vector entries:\n' );
  fprintf ( 1, '  A(I) = mod ( i - 1, c ) + 1\n' );
  fprintf ( 1, '  Count the number of candies of each type.\n' );

  c = 4;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Count using candy_count_vector()\n' );
  fprintf ( 1, '  Fix value of C = %d\n', c );
  fprintf ( 1, '  Consider a range of values of N:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   N    #1  #2  #3  #4\n' );
  fprintf ( 1, '\n' );

  for n = 3 : 10
    counts = candy_count_vector ( c, n );
    fprintf ( 1, '  %2d: ', n );
    for i = 1 : c
      fprintf ( 1, '  %2d', counts(i) );
    end
    fprintf ( 1, '\n' );
  end

  c = 4;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Repeat calculation, using candy_count_vector_sum()\n' );
  fprintf ( 1, '  Fix value of C = %d\n', c );
  fprintf ( 1, '  Consider a range of values of N:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   N    #1  #2  #3  #4\n' );
  fprintf ( 1, '\n' );

  for n = 3 : 10
    counts = candy_count_vector_sum ( c, n );
    fprintf ( 1, '  %2d: ', n );
    for i = 1 : c
      fprintf ( 1, '  %2d', counts(i) );
    end
    fprintf ( 1, '\n' );
  end

  return
end
