Skip to content

Commit

Permalink
fixed impl of link for AbstractVarInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
torfjelde committed Aug 31, 2023
1 parent d310fa8 commit 6a21ee2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/abstract_varinfo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,13 @@ If `t` is not provided, `default_transformation(model, vi)` will be used.
See also: [`default_transformation`](@ref), [`invlink`](@ref).
"""
link(vi::AbstractVarInfo, model::Model) = link!!(deepcopy(vi), SampleFromPrior(), model)
link(vi::AbstractVarInfo, model::Model) = link(deepcopy(vi), SampleFromPrior(), model)
function link(t::AbstractTransformation, vi::AbstractVarInfo, model::Model)
return link!!(t, deepcopy(vi), SampleFromPrior(), model)
return link(t, deepcopy(vi), SampleFromPrior(), model)

Check warning on line 399 in src/abstract_varinfo.jl

View check run for this annotation

Codecov / codecov/patch

src/abstract_varinfo.jl#L398-L399

Added lines #L398 - L399 were not covered by tests
end
function link(vi::AbstractVarInfo, spl::AbstractSampler, model::Model)
# Use `default_transformation` to decide which transformation to use if none is specified.
return link!!(default_transformation(model, vi), deepcopy(vi), spl, model)
return link(default_transformation(model, vi), deepcopy(vi), spl, model)
end

"""
Expand Down

0 comments on commit 6a21ee2

Please sign in to comment.