Skip to content

Commit

Permalink
added explicit implementation of with_logabsdet_jacobian for PDBijector
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed Aug 4, 2023
1 parent 94f6a0e commit 83fee94
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/bijectors/pd.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,9 @@ function logabsdetjac_pdbijector_chol(X::AbstractMatrix)
return -(z + d * oftype(z, IrrationalConstants.logtwo))
end

# TODO: Implement explicitly.
function with_logabsdet_jacobian(b::PDBijector, X)
U = cholesky_upper(X)
return replace_diag(log, U), logabsdetjac_pdbijector_chol(U)
L = cholesky_lower(X)
return replace_diag(log, L), logabsdetjac_pdbijector_chol(L)
end

struct PDVecBijector <: Bijector end
Expand Down

0 comments on commit 83fee94

Please sign in to comment.