pub fn ou_step_seeded(
x: f32,
mu: f32,
theta: f32,
sigma: f32,
dt: f32,
seed: u32,
) -> (f32, u32)Expand description
Ornstein-Uhlenbeck step with deterministic seeded noise.
Generates one standard-normal sample from seed via prime_random::prng_gaussian,
then applies ou_step. Threads the seed forward so callers can chain steps
without external RNG state.
§Arguments
x,mu,theta,sigma,dt— same asou_stepseed—u32RNG state (non-zero); threads forward deterministically
§Returns
(x_next, next_seed) — new value and advanced seed.
§Example
use prime_diffusion::ou_step_seeded;
let (x1, s1) = ou_step_seeded(1.0, 0.0, 0.5, 0.1, 0.01, 12345_u32);
let (x2, _) = ou_step_seeded(x1, 0.0, 0.5, 0.1, 0.01, s1);
assert!(x1 != 1.0);