-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add AbstractModel implementation of LogDensityProblems interface (#110)
* added AbstractModel implementing the interface of LogDensityProblems * version bump and add LogDensityProblems as a dep * Update Project.toml Co-authored-by: David Widmann <[email protected]> * removed forwarding of methods for LogDensityModel * Apply suggestions from code review Co-authored-by: David Widmann <[email protected]> * bump julia compat to 1.6 Co-authored-by: David Widmann <[email protected]>
- Loading branch information
Showing
4 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
""" | ||
LogDensityModel <: AbstractMCMC.AbstractModel | ||
Wrapper around something that implements the LogDensityProblem.jl interface. | ||
Note that this does _not_ implement the LogDensityProblems.jl interface itself, | ||
but it simply useful for indicating to the `sample` and other `AbstractMCMC` methods | ||
that the wrapped object implements the LogDensityProblems.jl interface. | ||
# Fields | ||
- `logdensity`: The object that implements the LogDensityProblems.jl interface. | ||
""" | ||
struct LogDensityModel{L} <: AbstractModel | ||
logdensity::L | ||
end |
18ea3f1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
18ea3f1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/74348
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: