function perm1_index_to_cycle_test ( )

%*****************************************************************************80
%
%% PERM1_INDEX_TO_CYCLE_TEST tests PERM1_INDEX_TO_CYCLE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  n = 9;
  p1 = [ 2,3,9,6,7,8,5,4,1 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'PERM1_INDEX_TO_CYCLE_TEST\n' );
  fprintf ( 1, '  PERM1_INDEX_TO_CYCLE converts a permutation of (1,...,N) from\n' );
  fprintf ( 1, '  standard index to cycle form.\n' );
 
  perm1_print ( n, p1, '  The standard index form permutation:' );
 
  p2 = perm1_index_to_cycle ( n, p1 );

  perm1_print ( n, p2, '  The permutation in cycle form:' );

  p3 = perm1_cycle_to_index ( n, p2 );
 
  perm1_print ( n, p3, '  The standard index form permutation:' );
 
  return
end
