flow.residual_history

flow.residual_history(step_fn, theta, f0, options)

The same march, reporting the residual after every chunk.

Runs the full max_steps without early exit so the history has a fixed length and the whole thing stays one compiled computation. This is a diagnostic, not the path gradients are taken through.

Parameters

Name Type Description Default
step_fn Callable (f, theta) -> f. required
theta Any The differentiable parameters. required
f0 jax.Array Initial populations. required
options SteadyOptions Convergence settings. required

Returns

Name Type Description
jax.Array (f, history) – the final populations and the (chunks,)
jax.Array per-step relative change recorded after each chunk.