Skip to content

Commit 6abbd3b

Browse files
Improved Levy area documentation
1 parent daed558 commit 6abbd3b

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

diffrax/_brownian/path.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,19 @@ class UnsafeBrownianPath(AbstractBrownianPath):
4545
motion. Hence the restrictions above. (They describe the general case for which the
4646
correlation structure isn't needed.)
4747
48-
Depending on the `levy_area` argument, this can also be used to generate Levy area.
48+
!!! info "Levy Area"
49+
50+
Can be initialised with `levy_area` set to `diffrax.BrownianIncrement`, or
51+
`diffrax.SpaceTimeLevyArea`. If `levy_area=diffrax.SpaceTimeLevyArea`, then it
52+
also computes space-time Lévy area `H`. This is an additional source of
53+
randomness required for certain stochastic Runge--Kutta solvers; see
54+
[`diffrax.AbstractSRK`][] for more information.
55+
56+
An error will be thrown during tracing if Lévy area is required but is not
57+
available.
58+
59+
The choice here will impact the Brownian path, so even with the same key, the
60+
trajectory will be different depending on the value of `levy_area`.
4961
"""
5062

5163
shape: PyTree[jax.ShapeDtypeStruct] = eqx.field(static=True)

diffrax/_brownian/tree.py

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,10 +137,19 @@ def _split_interval(
137137
class VirtualBrownianTree(AbstractBrownianPath):
138138
"""Brownian simulation that discretises the interval `[t0, t1]` to tolerance `tol`.
139139
140-
Can be initialised with `levy_area` set to `""`, or `"space-time"`.
141-
If `levy_area="space_time"`, then it also computes space-time Lévy area `H`.
142-
This will impact the Brownian path, so even with the same key, the trajectory will
143-
be different depending on the value of `levy_area`.
140+
!!! info "Levy Area"
141+
142+
Can be initialised with `levy_area` set to `diffrax.BrownianIncrement`, or
143+
`diffrax.SpaceTimeLevyArea`. If `levy_area=diffrax.SpaceTimeLevyArea`, then it
144+
also computes space-time Lévy area `H`. This is an additional source of
145+
randomness required for certain stochastic Runge--Kutta solvers; see
146+
[`diffrax.AbstractSRK`][] for more information.
147+
148+
An error will be thrown during tracing if Lévy area is required but is not
149+
available.
150+
151+
The choice here will impact the Brownian path, so even with the same key, the
152+
trajectory will be different depending on the value of `levy_area`.
144153
145154
??? cite "Reference"
146155

0 commit comments

Comments
 (0)