Skip to content

Commit c5d301a

Browse files
Tweaks
1 parent a1003ef commit c5d301a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

diffrax/brownian/tree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def _body_fun(_state):
184184
# conditional variance. This means that the Virtual Brownian Tree will pass
185185
# statistical tests comparing w(t)|(w(s),w(u)) against the true Brownian
186186
# bridge. (Provided s, t, u are greater than the discretisation level `tol`.)
187-
# (If you just do linear then you find that the variance is *every so slightly*
187+
# (If you just do linear then you find that the variance is *ever so slightly*
188188
# too small.)
189189
s = final_state.s
190190
u = final_state.u
@@ -198,7 +198,7 @@ def _body_fun(_state):
198198
# [t^2 t 1][b] = [w_t]
199199
# [u^2 u 1][c] [w_u]
200200
#
201-
# `A` is inverse of the above matrix, rescaled to s=0, t=0.5, u=1.
201+
# `A` is the inverse of the above matrix, with s=0, t=0.5, u=1.
202202
A = jnp.array([[2, -4, 2], [-3, 4, -1], [1, 0, 0]])
203203
coeffs = jnp.tensordot(A, jnp.stack([w_s, w_t, w_u]), axes=1)
204204
return jnp.polyval(coeffs, rescaled_τ)

diffrax/solver/implicit_euler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from ..local_interpolation import LocalLinearInterpolation
88
from ..solution import RESULTS
99
from ..term import AbstractTerm
10-
from .base import AbstractImplicitSolver
10+
from .base import AbstractAdaptiveSolver, AbstractImplicitSolver
1111

1212

1313
_SolverState = None
@@ -19,7 +19,7 @@ def _implicit_relation(z1, nonlinear_solve_args):
1919
return diff
2020

2121

22-
class ImplicitEuler(AbstractImplicitSolver):
22+
class ImplicitEuler(AbstractImplicitSolver, AbstractAdaptiveSolver):
2323
r"""Implicit Euler method.
2424
2525
A-B-L stable 1st order SDIRK method. Has an embedded 2nd order Heun method for

0 commit comments

Comments
 (0)