|
1 |
| -abstract type LogdensityComputation end |
| 1 | +# abstract type LogdensityComputation end |
2 | 2 |
|
3 |
| -struct LogpdfComputation end |
| 3 | +# struct LogpdfComputation end |
4 | 4 |
|
5 |
| -struct BasemeasureComputation{B} <: LogdensityComputation |
6 |
| - base::B |
7 |
| -end |
| 5 | +# struct BasemeasureComputation{B} <: LogdensityComputation |
| 6 | +# base::B |
| 7 | +# end |
8 | 8 |
|
9 |
| -struct LogdensityThunk{C,M,X,L} |
10 |
| - computation::C |
11 |
| - measure::M |
12 |
| - x::X |
13 |
| - ℓ::L |
14 |
| -end |
| 9 | +# struct LogdensityThunk{C,M,X,L} |
| 10 | +# computation::C |
| 11 | +# measure::M |
| 12 | +# x::X |
| 13 | +# ℓ::L |
| 14 | +# end |
15 | 15 |
|
16 |
| -function reduce_step(thunk :: LogdensityThunk, callback=Returns(nothing)) |
| 16 | +# function reduce_step(thunk :: LogdensityThunk, callback=Returns(nothing)) |
17 | 17 |
|
18 | 18 |
|
19 | 19 |
|
20 |
| -reduce_step(LogdensityThunk{M,B,X,L}, callback=Returns(nothing)) -> Union{LogdensityThunk, L} |
| 20 | +# reduce_step(LogdensityThunk{M,B,X,L}, callback=Returns(nothing)) -> Union{LogdensityThunk, L} |
21 | 21 |
|
22 |
| -function logdensity(μ, b, x; cb=Returns(nothing)) |
23 |
| - f(thunk) = reduce_step(thunk, cb) |
24 |
| - fix(f, LogdensityThunk(μ, b, x, zero(Float64))) |
25 |
| -end |
| 22 | +# function logdensity(μ, b, x; cb=Returns(nothing)) |
| 23 | +# f(thunk) = reduce_step(thunk, cb) |
| 24 | +# fix(f, LogdensityThunk(μ, b, x, zero(Float64))) |
| 25 | +# end |
0 commit comments