function perm1_canon_to_cycle_test ( )

%*****************************************************************************80
%
%% perm1_canon_to_cycle_test() tests perm1_canon_to_cycle().
%
%  Licensing:
%
%    This code is distributed under the MIT 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
