Skip to main content

Crate prime_diffusion

Crate prime_diffusion 

Source
Expand description

prime-diffusion — Stochastic processes: Ornstein-Uhlenbeck and geometric Brownian motion.

All public functions are pure (LOAD + COMPUTE only). No &mut, no side effects, no hidden state. Noise is either supplied externally (caller-provided standard normal w) or generated deterministically from a threaded u32 seed via prime_random::prng_gaussian.

§Temporal Assembly Model

  • LOAD — read parameters + state
  • COMPUTE — stochastic update formula
  • APPEND — return (next_value, next_seed) as a tuple

STORE and JUMP do not exist here. Seeded variants thread the seed forward like prime_random::prng_next — pure state machines.

§Included

  • ou_step — Ornstein-Uhlenbeck step (caller-supplied noise)
  • ou_step_seeded — OU step with deterministic Gaussian noise from threaded seed
  • gbm_step — Geometric Brownian motion step (caller-supplied noise)
  • gbm_step_seeded — GBM step with deterministic noise from threaded seed

Functions§

gbm_step
Geometric Brownian motion step with caller-supplied noise.
gbm_step_seeded
Geometric Brownian motion step with deterministic seeded noise.
ou_step
Ornstein-Uhlenbeck step with caller-supplied noise.
ou_step_seeded
Ornstein-Uhlenbeck step with deterministic seeded noise.