@@ -81,18 +81,12 @@ The `MCMCSerial` algorithm allows users to sample serially, with no thread or pr
81
81
struct MCMCSerial <: AbstractMCMCEnsemble end
82
82
83
83
"""
84
- getparams(model::AbstractModel, state)
85
- getparams(logdensity, state)
86
- getparams(state)
84
+ getparams([model::AbstractModel, ]state)
87
85
88
86
Retrieve the values of parameters from the sampler's `state` as a `Vector{<:Real}`.
89
87
"""
90
88
function getparams end
91
89
92
- function getparams (logdensity, state)
93
- return getparams (_model (logdensity), state)
94
- end
95
-
96
90
function getparams (model:: AbstractModel , state)
97
91
return getparams (state)
98
92
end
@@ -111,17 +105,11 @@ Although not enforced, it should hold that `setparams!!(state, getparams(state))
111
105
words, the sampler should implement a consistent transformation between its internal representation
112
106
and the vector representation of the parameter values.
113
107
114
- Sometimes, to maintain the consistency of the log density and parameter values, a `model::AbstractModel `
108
+ Sometimes, to maintain the consistency of the log density and parameter values, a `model`
115
109
should be provided. This is useful for samplers that need to evaluate the log density at the new parameter values.
116
- If `model` is not an `AbstractMCMC.AbstractModel`, by default, it is assumed to be a log density function following
117
- the `LogDensityProblems.jl` interface, and will be wrapped with [`AbstractMCMC.LogDensityModel`](@ref).
118
110
"""
119
111
function setparams!! end
120
112
121
- function setparams!! (logdensity, state, params)
122
- return setparams!! (_model (logdensity), state, params)
123
- end
124
-
125
113
function setparams!! (model:: AbstractModel , state, params)
126
114
return setparams!! (state, params)
127
115
end
0 commit comments