Skip to content

Commit fe07d8e

Browse files
authored
Allow islinked for SampleFromPrior
1 parent a673228 commit fe07d8e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/varinfo.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ end
766766

767767

768768
"""
769-
islinked(vi::VarInfo, spl::Sampler)
769+
islinked(vi::VarInfo, spl::Union{Sampler, SampleFromPrior})
770770
771771
Check whether `vi` is in the transformed space for a particular sampler `spl`.
772772
@@ -775,11 +775,11 @@ Turing's Hamiltonian samplers use the `link` and `invlink` functions from
775775
(for example, one bounded to the space `[0, 1]`) from its constrained space to the set of
776776
real numbers. `islinked` checks if the number is in the constrained space or the real space.
777777
"""
778-
function islinked(vi::UntypedVarInfo, spl::Sampler)
778+
function islinked(vi::UntypedVarInfo, spl::Union{Sampler, SampleFromPrior})
779779
vns = _getvns(vi, spl)
780780
return istrans(vi, vns[1])
781781
end
782-
function islinked(vi::TypedVarInfo, spl::Sampler)
782+
function islinked(vi::TypedVarInfo, spl::Union{Sampler, SampleFromPrior})
783783
vns = _getvns(vi, spl)
784784
return _islinked(vi, vns)
785785
end

0 commit comments

Comments
 (0)