@@ -30,28 +30,28 @@ NoiseProcess(t0, W0, Z0, dist, bridge;
30
30
- `reset` whether to reset the process with each solve.
31
31
- `reseed` whether to reseed the process with each solve.
32
32
33
- The signature for the `dist` is
33
+ The signature for the `dist` is:
34
34
35
35
```julia
36
- dist!(rand_vec, W, dt, rng)
36
+ dist!(rand_vec, dW, W, dt, u, p, t , rng)
37
37
```
38
38
39
- for inplace functions, and
39
+ for inplace functions, and:
40
40
41
41
```julia
42
- rand_vec = dist(W, dt, rng)
42
+ rand_vec = dist(dW, W, dt, u, p, t , rng)
43
43
```
44
44
45
- otherwise. The signature for `bridge` is
45
+ otherwise. The signature for `bridge` is:
46
46
47
47
```julia
48
- bridge!(rand_vec, W, W0, Wh, q, h, rng)
48
+ bridge!(rand_vec, dW, W, W0, Wh, q, h, u, p, t , rng)
49
49
```
50
50
51
- and the out of place syntax is
51
+ and the out of place syntax is:
52
52
53
53
```julia
54
- rand_vec = bridge!( W, W0, Wh, q, h, rng)
54
+ rand_vec = bridge(dW, W, W0, Wh, q, h, u, p, t , rng)
55
55
```
56
56
57
57
Here, `W` is the noise process, `W0` is the left side of the current interval,
@@ -80,7 +80,7 @@ for ``W(0)=0`` which defines the stepping distribution. Thus, its noise distribu
80
80
function is:
81
81
82
82
```julia
83
- @inline function WHITE_NOISE_DIST(W, dt, rng)
83
+ @inline function WHITE_NOISE_DIST(dW, W, dt, u, p, t , rng)
84
84
if W.dW isa AbstractArray && !(W.dW isa SArray)
85
85
return @fastmath sqrt(abs(dt)) * wiener_randn(rng, W.dW)
86
86
else
92
92
for the out of place versions, and for the inplace versions
93
93
94
94
```julia
95
- function INPLACE_WHITE_NOISE_DIST(rand_vec, W, dt, rng)
95
+ function INPLACE_WHITE_NOISE_DIST(rand_vec, dW, W, dt, u, p, t , rng)
96
96
wiener_randn!(rng, rand_vec)
97
97
sqrtabsdt = @fastmath sqrt(abs(dt))
98
98
@. rand_vec *= sqrtabsdt
@@ -111,15 +111,15 @@ W(qh) ∼ N(qWₕ,(1-q)qh)
111
111
Thus, we have the out-of-place and in-place versions as:
112
112
113
113
```julia
114
- function WHITE_NOISE_BRIDGE(W, W0, Wh, q, h, rng)
114
+ function WHITE_NOISE_BRIDGE(dW, W, W0, Wh, q, h, u, p, t , rng)
115
115
if W.dW isa AbstractArray
116
116
return @fastmath sqrt((1 - q) * q * abs(h)) * wiener_randn(rng, W.dW) + q * Wh
117
117
else
118
118
return @fastmath sqrt((1 - q) * q * abs(h)) * wiener_randn(rng, typeof(W.dW)) +
119
119
q * Wh
120
120
end
121
121
end
122
- function INPLACE_WHITE_NOISE_BRIDGE(rand_vec, W, W0, Wh, q, h, rng)
122
+ function INPLACE_WHITE_NOISE_BRIDGE(rand_vec, dW, W, W0, Wh, q, h, u, p, t , rng)
123
123
wiener_randn!(rng, rand_vec)
124
124
#rand_vec .= sqrt((1.-q).*q.*abs(h)).*rand_vec.+q.*Wh
125
125
sqrtcoeff = @fastmath sqrt((1 - q) * q * abs(h))
0 commit comments