function i4col_sorted_singleton_count_test ( )

%*****************************************************************************80
%
%% i4col_sorted_singleton_count_test() tests i4col_sorted_singleton_count().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 November 2014
%
%  Author:
%
%    John Burkardt
%
  m = 3;
  n = 10;
  test_num = 2;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'i4col_sorted_singleton_count_test():\n' );
  fprintf ( 1, '  i4col_sorted_singleton_count() counts singletons\n' );
  fprintf ( 1, '  in a sorted I4COL;\n' );

  for test = 1 : test_num

    b = 0;
    c = 3;

    a = randi ( [ b, c ], m, n );

    a = i4col_sort_a ( m, n, a );

    i4mat_print ( m, n, a, '  Ascending sorted I4COL:' );

    singleton_num = i4col_sorted_singleton_count ( m, n, a );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  Number of singletons = %d\n', singleton_num );

  end

  return
end
