function determ = antisymmetric_random_determinant ( n, key )

%*****************************************************************************80
%
%% antisymmetric_random_determinant(): determinant of ANTISYMMETRIC_RANDOM matrix.
%
%  Discussion:
%
%    If N is odd, the determinant is 0.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 May 2020
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Michael Wimmer,
%    Algorithm 923: Efficient Numerical Computation of the Pfaffian for
%    Dense and Banded Skew-Symmetric Matrices,
%    ACM Transactions on Mathematical Software,
%    Volume 38, Number 4, Article 30, August 2012.
%
%  Input:
%
%    integer N, the order of A.
%
%    integer KEY, a positive value that selects the data.
%
%  Output:
%
%    real DETERM, the determinant.
%
  if ( mod ( n, 2 ) == 1 )
    determ = 0.0;
  else
    A = antisymmetric_random_matrix ( n, key );
    determ = ( pfaffian_ltl ( A ) )^2;
  end

  return
end

