Skip to content

Commit 4a772ef

Browse files
lockwopatrick-kidger
authored andcommitted
adapt
1 parent e690b6e commit 4a772ef

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

diffrax/_solver/align.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
UnderdampedLangevinTuple,
1616
UnderdampedLangevinX,
1717
)
18+
from .base import AbstractAdaptiveSolver
1819
from .foster_langevin_srk import (
1920
AbstractCoeffs,
2021
AbstractFosterLangevinSRK,
@@ -44,7 +45,9 @@ def __init__(self, beta, a1, b1, aa, chh):
4445
_ErrorEstimate = UnderdampedLangevinTuple
4546

4647

47-
class ALIGN(AbstractFosterLangevinSRK[_ALIGNCoeffs, _ErrorEstimate]):
48+
class ALIGN(
49+
AbstractFosterLangevinSRK[_ALIGNCoeffs, _ErrorEstimate], AbstractAdaptiveSolver
50+
):
4851
r"""The Adaptive Langevin via Interpolated Gradients and Noise method
4952
designed by James Foster. This is a second order solver for the
5053
Underdamped Langevin Diffusion, and accepts terms of the form

diffrax/_solver/spark.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import equinox.internal as eqxi
44
import numpy as np
55

6-
from .base import AbstractStratonovichSolver
6+
from .base import AbstractAdaptiveSolver, AbstractStratonovichSolver
77
from .srk import AbstractSRK, GeneralCoeffs, StochasticButcherTableau
88

99

@@ -35,7 +35,7 @@
3535
)
3636

3737

38-
class SPaRK(AbstractSRK, AbstractStratonovichSolver):
38+
class SPaRK(AbstractSRK, AbstractStratonovichSolver, AbstractAdaptiveSolver):
3939
r"""The Splitting Path Runge-Kutta method.
4040
4141
It uses three evaluations of the drift and diffusion per step, and has the following

0 commit comments

Comments
 (0)