Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EuclideanIntegrator -> Integrator #588

Merged
merged 1 commit into from
Nov 12, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions blackjax/mcmc/integrators.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class IntegratorState(NamedTuple):
logdensity_grad: ArrayTree


EuclideanIntegrator = Callable[[IntegratorState, float], IntegratorState]
Integrator = Callable[[IntegratorState, float], IntegratorState]


def new_integrator_state(logdensity_fn, position, momentum):
Expand All @@ -46,7 +46,7 @@ def new_integrator_state(logdensity_fn, position, momentum):
def velocity_verlet(
logdensity_fn: Callable,
kinetic_energy_fn: EuclideanKineticEnergy,
) -> EuclideanIntegrator:
) -> Integrator:
"""The velocity Verlet (or Verlet-Störmer) integrator.

The velocity Verlet is a two-stage palindromic integrator :cite:p:`bou2018geometric` of the form
Expand Down Expand Up @@ -105,7 +105,7 @@ def one_step(state: IntegratorState, step_size: float) -> IntegratorState:
def mclachlan(
logdensity_fn: Callable,
kinetic_energy_fn: Callable,
) -> EuclideanIntegrator:
) -> Integrator:
"""Two-stage palindromic symplectic integrator derived in :cite:p:`blanes2014numerical`.

The integrator is of the form (b1, a1, b2, a1, b1). The choice of the parameters
Expand Down Expand Up @@ -170,7 +170,7 @@ def one_step(state: IntegratorState, step_size: float) -> IntegratorState:
def yoshida(
logdensity_fn: Callable,
kinetic_energy_fn: Callable,
) -> EuclideanIntegrator:
) -> Integrator:
"""Three stages palindromic symplectic integrator derived in :cite:p:`mclachlan1995numerical`

The integrator is of the form (b1, a1, b2, a2, b2, a1, b1). The choice of
Expand Down