function perm1_cycle_test ( )

%*****************************************************************************80
%
%% PERM1_CYCLE_TEST tests PERM1_CYCLE.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  n = 9;

  p = [ 2,3,9,6,7,8,5,4,1 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'PERM1_CYCLE_TEST\n' );
  fprintf ( 1, '  PERM1_CYCLE analyzes a permutation of (1,...,N).\n' );
 
  perm1_print ( n, p, '  The permutation:' );
 
  iopt = 1;
  [ p2, isgn, ncycle ] = perm1_cycle ( n, iopt, p );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  NCYCLE = %d\n', ncycle );
  fprintf ( 1, '  ISGN =   %d\n', isgn );

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