function determ = perm_determinant ( n, a )

%*****************************************************************************80
%
%% PERM_DETERMINANT returns the determinant of a permutation matrix.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 October 2007
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the order of A.
%
%    real A(N,N), the matrix.
%
%  Output:
%
%    real DETERM, the determinant.
%
  p = perm_mat_to_vec ( n, a );

  p_sign = perm_sign ( n, p );

  determ = p_sign;

  return
end
