Skip to content

Commit

Permalink
small fix of docs in all three and a return type in quicsort
Browse files Browse the repository at this point in the history
  • Loading branch information
andyElking authored and patrick-kidger committed Nov 29, 2024
1 parent 2d8e87c commit 5bdd890
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
5 changes: 3 additions & 2 deletions diffrax/_solver/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ def __init__(self, beta, a1, b1, aa, chh):
class ALIGN(AbstractFosterLangevinSRK[_ALIGNCoeffs, _ErrorEstimate]):
r"""The Adaptive Langevin via Interpolated Gradients and Noise method
designed by James Foster. This is a second order solver for the
Underdamped Langevin Diffusion, the terms for which can be created using
[`diffrax.make_underdamped_langevin_term`][]. Uses two evaluations of the vector
Underdamped Langevin Diffusion, and accepts terms of the form
`MultiTerm(UnderdampedLangevinDriftTerm, UnderdampedLangevinDiffusionTerm)`.
Uses two evaluations of the vector
field per step, but is FSAL, so in practice it only requires one.
??? cite "Reference"
Expand Down
8 changes: 4 additions & 4 deletions diffrax/_solver/quicsort.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ def __init__(self, beta_lr1, a_lr1, b_lr1, a_third, a_div_h):
class QUICSORT(AbstractFosterLangevinSRK[_QUICSORTCoeffs, None]):
r"""The QUadrature Inspired and Contractive Shifted ODE with Runge-Kutta Three
method by James Foster and Daire O'Kane. This is a third order solver for the
Underdamped Langevin Diffusion, the terms for which can be created using
[`diffrax.make_underdamped_langevin_term`][]. Uses two evaluations of the vector
field per step.
Underdamped Langevin Diffusion, and accepts terms of the form
`MultiTerm(UnderdampedLangevinDriftTerm, UnderdampedLangevinDiffusionTerm)`.
Uses two evaluations of the vector field per step.
??? cite "Reference"
Expand Down Expand Up @@ -199,7 +199,7 @@ def _compute_step(
coeffs: _QUICSORTCoeffs,
rho: UnderdampedLangevinX,
prev_f: Optional[UnderdampedLangevinX],
) -> tuple[UnderdampedLangevinX, UnderdampedLangevinX, UnderdampedLangevinX, None]:
) -> tuple[UnderdampedLangevinX, UnderdampedLangevinX, None, None]:
del prev_f
dtypes = jtu.tree_map(jnp.result_type, x0)
w: UnderdampedLangevinX = jtu.tree_map(jnp.asarray, levy.W, dtypes)
Expand Down
5 changes: 3 additions & 2 deletions diffrax/_solver/should.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,9 @@ def __init__(self, beta_half, a_half, b_half, beta1, a1, b1, aa, chh, ckk):
class ShOULD(AbstractFosterLangevinSRK[_ShOULDCoeffs, None]):
r"""The Shifted-ODE Runge-Kutta Three method
designed by James Foster. This is a third order solver for the
Underdamped Langevin Diffusion, the terms for which can be created using
[`diffrax.make_underdamped_langevin_term`][]. Uses three evaluations of the vector
Underdamped Langevin Diffusion, the terms of the form
`MultiTerm(UnderdampedLangevinDriftTerm, UnderdampedLangevinDiffusionTerm)`.
Uses three evaluations of the vector
field per step, but is FSAL, so in practice it only requires two.
??? cite "Reference"
Expand Down

0 comments on commit 5bdd890

Please sign in to comment.