function vector_multiplicity_test ( )

%*****************************************************************************80
%
%% vector_multiplicity_test() tests vector_multiplicity().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 November 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'vector_multiplicity_test():\n' );
  fprintf ( 1, '  vector_multiplicity() finds the multiplicity of an integer\n' );
  fprintf ( 1, '  vector.\n' );

  d = 3;
  b = 3;
  more = false;
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The dimension d = %d\n', d );
  fprintf ( 1, '  The base b =      %d\n', b );
  fprintf ( 1, '\n' );
  
  a = [];
  i = 0;
  
  while ( true )

    [ a, more ] = vector_lex_next ( d, b, a, more );

    if ( ~ more )
      break
    end

    mult = vector_multiplicity ( a );

    i = i + 1;
    fprintf ( 1, '  %2d  %d: [ %d, %d, %d ]\n', i, mult, a );

  end

  return
end
