function perm1_canon_to_cycle_test ( )

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

  fprintf ( 1, '\n' );
  fprintf ( 1, 'PERM1_CANON_TO_CYCLE_TEST\n' );
  fprintf ( 1, '  PERM1_CANON_TO_CYCLE converts a permutation of (1,...,N) from\n' );
  fprintf ( 1, '  canonical to cycle form.\n' );
 
  perm1_print ( n, p1, '  The permutation in canonical form:' );
 
  p2 = perm1_canon_to_cycle ( n, p1 );

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

  return
end
