We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e0732f commit d292161Copy full SHA for d292161
src/pfaffian.jl
@@ -74,7 +74,7 @@ function _pfaffian!(A::SkewHermitian{<:Real})
74
for i=1:2:n-1
75
pf *= -T.ev[i]
76
end
77
- return pf
+ return pf * sign(det(H.Q))
78
79
80
function _pfaffian!(A::SkewHermTridiagonal{<:Real})
@@ -120,7 +120,7 @@ function _logabspfaffian!(A::SkewHermitian{<:Real})
120
logpf += log(abs(T.ev[i]))
121
sgn *= sign(-T.ev[i])
122
123
- return logpf, sgn
+ return logpf, sgn*sign(det(H.Q))
124
125
function _logabspfaffian!(A::SkewHermTridiagonal{<:Real})
126
n = size(A, 1)
0 commit comments