@@ -65,13 +65,13 @@ struct CorrBijector <: Bijector end
65
65
66
66
with_logabsdet_jacobian (b:: CorrBijector , x) = transform (b, x), logabsdetjac (b, x)
67
67
68
- function transform (b:: CorrBijector , X:: AbstractMatrix{<:Real} )
68
+ function transform (b:: CorrBijector , X)
69
69
w = cholesky_upper (X)
70
70
r = _link_chol_lkj (w)
71
71
return r
72
72
end
73
73
74
- function with_logabsdet_jacobian (ib:: Inverse{CorrBijector} , y:: AbstractMatrix{<:Real} )
74
+ function with_logabsdet_jacobian (ib:: Inverse{CorrBijector} , y)
75
75
U, logJ = _inv_link_chol_lkj (y)
76
76
K = size (U, 1 )
77
77
for j in 2 : (K - 1 )
@@ -80,8 +80,8 @@ function with_logabsdet_jacobian(ib::Inverse{CorrBijector}, y::AbstractMatrix{<:
80
80
return pd_from_upper (U), logJ
81
81
end
82
82
83
- logabsdetjac (:: Inverse{CorrBijector} , Y:: AbstractMatrix{<:Real} ) = _logabsdetjac_inv_corr (Y)
84
- function logabsdetjac (b:: CorrBijector , X:: AbstractMatrix{<:Real} )
83
+ logabsdetjac (:: Inverse{CorrBijector} , Y) = _logabsdetjac_inv_corr (Y)
84
+ function logabsdetjac (b:: CorrBijector , X)
85
85
#=
86
86
It may be more efficient if we can use un-contraint value to prevent call of b
87
87
It's recommended to directly call
@@ -135,7 +135,7 @@ function logabsdetjac(b::VecCorrBijector, x)
135
135
return - logabsdetjac (inverse (b), b (x))
136
136
end
137
137
138
- function with_logabsdet_jacobian (:: Inverse{VecCorrBijector} , y:: AbstractVector{<:Real} )
138
+ function with_logabsdet_jacobian (:: Inverse{VecCorrBijector} , y)
139
139
U_logJ = _inv_link_chol_lkj (y)
140
140
# workaround for `Tracker.TrackedTuple` not supporting iteration
141
141
U, logJ = U_logJ[1 ], U_logJ[2 ]
@@ -146,7 +146,7 @@ function with_logabsdet_jacobian(::Inverse{VecCorrBijector}, y::AbstractVector{<
146
146
return pd_from_upper (U), logJ
147
147
end
148
148
149
- function logabsdetjac (:: Inverse{VecCorrBijector} , y:: AbstractVector{<:Real} )
149
+ function logabsdetjac (:: Inverse{VecCorrBijector} , y)
150
150
return _logabsdetjac_inv_corr (y)
151
151
end
152
152
0 commit comments