Skip to content

Commit 8178c55

Browse files
committed
Rename pullback to pullbck and export it
pullback has a huge potential for naming conflickts, and pullbck is more in line with pushfwd. Also simplify implementation of pullbck.
1 parent 20d4ac4 commit 8178c55

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/combinators/transformedmeasure.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ end
140140
# pullback
141141

142142
"""
143-
pullback(f, μ, volcorr = WithVolCorr())
143+
pullbck(f, μ, volcorr = WithVolCorr())
144144
145145
A _pullback_ is a dual concept to a _pushforward_. While a pushforward needs a
146146
map _from_ the support of a measure, a pullback requires a map _into_ the
@@ -152,8 +152,11 @@ in terms of the inverse function; the "forward" function is not used at all. In
152152
some cases, we may be focusing on log-density (and not, for example, sampling).
153153
154154
To manually specify an inverse, call
155-
`pullback(InverseFunctions.setinverse(f, finv), μ, volcorr)`.
155+
`pullbck(InverseFunctions.setinverse(f, finv), μ, volcorr)`.
156156
"""
157-
function pullback(f, μ, volcorr::TransformVolCorr = WithVolCorr())
158-
pushfwd(setinverse(inverse(f), f), μ, volcorr)
157+
function pullbck(f, μ, volcorr::TransformVolCorr = WithVolCorr())
158+
PushforwardMeasure(inverse(f), f, μ, volcorr)
159159
end
160+
export pullbck
161+
162+
@deprecate pullback(f, μ, volcorr::TransformVolCorr = WithVolCorr()) pullbck(f, μ, volcorr)

0 commit comments

Comments
 (0)