Skip to content

Commit e2535e0

Browse files
Merge pull request #216 from SciML/ChrisRackauckas-patch-3
Update NoiseProcess function definitions in docstring
2 parents b32976c + 1136ffc commit e2535e0

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/types.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,28 +30,28 @@ NoiseProcess(t0, W0, Z0, dist, bridge;
3030
- `reset` whether to reset the process with each solve.
3131
- `reseed` whether to reseed the process with each solve.
3232
33-
The signature for the `dist` is
33+
The signature for the `dist` is:
3434
3535
```julia
36-
dist!(rand_vec, W, dt, rng)
36+
dist!(rand_vec, dW, W, dt, u, p, t, rng)
3737
```
3838
39-
for inplace functions, and
39+
for inplace functions, and:
4040
4141
```julia
42-
rand_vec = dist(W, dt, rng)
42+
rand_vec = dist(dW, W, dt, u, p, t, rng)
4343
```
4444
45-
otherwise. The signature for `bridge` is
45+
otherwise. The signature for `bridge` is:
4646
4747
```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)
4949
```
5050
51-
and the out of place syntax is
51+
and the out of place syntax is:
5252
5353
```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)
5555
```
5656
5757
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
8080
function is:
8181
8282
```julia
83-
@inline function WHITE_NOISE_DIST(W, dt, rng)
83+
@inline function WHITE_NOISE_DIST(dW, W, dt, u, p, t, rng)
8484
if W.dW isa AbstractArray && !(W.dW isa SArray)
8585
return @fastmath sqrt(abs(dt)) * wiener_randn(rng, W.dW)
8686
else
@@ -92,7 +92,7 @@ end
9292
for the out of place versions, and for the inplace versions
9393
9494
```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)
9696
wiener_randn!(rng, rand_vec)
9797
sqrtabsdt = @fastmath sqrt(abs(dt))
9898
@. rand_vec *= sqrtabsdt
@@ -111,15 +111,15 @@ W(qh) ∼ N(qWₕ,(1-q)qh)
111111
Thus, we have the out-of-place and in-place versions as:
112112
113113
```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)
115115
if W.dW isa AbstractArray
116116
return @fastmath sqrt((1 - q) * q * abs(h)) * wiener_randn(rng, W.dW) + q * Wh
117117
else
118118
return @fastmath sqrt((1 - q) * q * abs(h)) * wiener_randn(rng, typeof(W.dW)) +
119119
q * Wh
120120
end
121121
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)
123123
wiener_randn!(rng, rand_vec)
124124
#rand_vec .= sqrt((1.-q).*q.*abs(h)).*rand_vec.+q.*Wh
125125
sqrtcoeff = @fastmath sqrt((1 - q) * q * abs(h))

0 commit comments

Comments
 (0)