function vector_next_equivalent_test ( )

%*****************************************************************************80
%
%% vector_next_equivalent_test() tests vector_next_equivalent().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 November 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'vector_next_equivalent_test():\n' );
  fprintf ( 1, '  vector_next_equivalent() finds vector equivalents.\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_next ( d, b, a, more );

    if ( ~ more )
      break
    end

    mult = vector_multiplicity ( d, b, a );

    i = i + 1;
    fprintf ( 1, '\n' );
    fprintf ( 1, '  %2d  %d: [ %d, %d, %d ]\n', i, mult, a );
%
%  Generate the equivalence sequence for A.
%
    a2 = sort ( a );
    j = 0;

    while ( true )

      j = j + 1;
      fprintf ( 1, '  %2d: [ %d, %d, %d ]\n', j, a2 );

      [ a2, more2 ] = vector_next_equivalent_new ( a2 );
      if ( ~ more2 )
        break
      end

    end

  end

  return
end
