@@ -30,7 +30,6 @@ function iterate(FS::NotFactSampler)
30
30
t, x, θ, ∇ϕx = t0, copy (x0), copy (θ0), copy (θ0)
31
31
c = FS. c
32
32
rng = FS. rng
33
- Ξ = Trace (t0, x0, θ0, Flow)
34
33
τref = waiting_time_ref (rng, Flow)
35
34
∇ϕx, v = FS.∇ϕ! (∇ϕx, t, x, θ, FS. args... )
36
35
∇ϕx = grad_correct! (∇ϕx, x, Flow)
@@ -50,3 +49,38 @@ function iterate(FS::NotFactSampler, (u, ∇ϕx, (acc, num), c, abc, (t′, ren
50
49
u = t => (x, θ)
51
50
return ev, (u, ∇ϕx, (acc, num), c, abc, (t′, renew), τref, v)
52
51
end
52
+
53
+ function rawevent (t, x, θ, Z:: Union{BouncyParticle,Boomerang} )
54
+ t, x, θ, nothing
55
+ end
56
+
57
+
58
+ function iterate (FS:: NotFactSampler{<:Any, <:Tuple} )
59
+ t0, (x0, θ0) = FS. u0
60
+ Flow = FS. F
61
+ n = length (x0)
62
+ t, x, θ, ∇ϕx = t0, copy (x0), copy (θ0), copy (θ0)
63
+ c = FS. c
64
+ rng = FS. rng
65
+ τref = waiting_time_ref (rng, Flow)
66
+
67
+
68
+ dϕ, ∇ϕ! = FS.∇ϕ![1 ], FS.∇ϕ![2 ]
69
+ θdϕ, v = dϕ (t, x, θ, FS. args... )
70
+ num = acc = 0
71
+ abc = ab (x, θ, c, θdϕ, v, Flow)
72
+
73
+ t′, renew = next_time (t, abc, rand (rng))
74
+ iterate (FS, ((t => (x, θ)), ∇ϕx, (acc, num), c, abc, (t′, renew), τref, v))
75
+ end
76
+
77
+
78
+ function iterate (FS:: NotFactSampler{<:Any, <:Tuple} , (u, ∇ϕx, (acc, num), c, abc, (t′, renew), τref, v))
79
+ t, (x, θ) = u
80
+ dϕ, ∇ϕ! = FS.∇ϕ![1 ], FS.∇ϕ![2 ]
81
+ t, x, θ, (acc, num), c, abc, (t′, renew), τref, v = pdmp_inner! (FS. rng, dϕ, ∇ϕ!, ∇ϕx, t, x, θ, c, abc, (t′, renew), τref, v, (acc, num), FS. F, FS. args... ; FS. kargs... )
82
+
83
+ ev = rawevent (t, x, θ, FS. F)
84
+ u = t => (x, θ)
85
+ return ev, (u, ∇ϕx, (acc, num), c, abc, (t′, renew), τref, v)
86
+ end
0 commit comments