hyperiax.prebuilt.bffg.continuous_forward_sweep¶
- hyperiax.prebuilt.bffg.continuous_forward_sweep(n_steps, drift_fn, diffusion_fn)[source]¶
Build the unconditional SDE forward-sampling down-sweep.
For each non-root node, integrates the true SDE \(dX_u = b(u, X_u)\,du + \sigma(u, X_u)\,dW_u\) from the parent’s terminal value
parent.vals[-1]over the edge using Euler-Maruyama and the pre-stored increments \(dW = \sqrt{\Delta t}\, z\) derived fromnode.zs.- Parameters:
n_steps – Number of Euler-Maruyama substeps per edge.
drift_fn –
(t, x, params) -> (d,)returning the true drift.diffusion_fn –
(t, x, params) -> (d, noise)returning the true diffusion matrix \(\sigma(t, x)\).
- Return type:
- Returns:
A
hyperiax.SweepFnthat writes the full per-edge trajectory tovalsat every non-root node. The root’svalsmust be set by the caller (typically viainit_continuous_tree()’sroot_val).