Bring the whole workspace into compliance with the repo's rustfmt config (edition 2024, max_width 100, use_small_heuristics = "Max"), which had drifted across many crates. Pure formatting — no logic changes; `cargo fmt --check` is now clean and `cargo build --workspace` is green.
18 lines
456 B
Rust
18 lines
456 B
Rust
use lawsynth_core::Seed;
|
|
use lawsynth_sim::{SdeConfig, euler_maruyama};
|
|
|
|
fn main() {
|
|
let trajectory = euler_maruyama(
|
|
&[1.0],
|
|
SdeConfig { start: 0.0, end: 1.0, step: 0.01, seed: Seed::new(7) },
|
|
|_, state| vec![-state[0]],
|
|
|_, _| vec![0.15],
|
|
)
|
|
.unwrap();
|
|
println!(
|
|
"Euler-Maruyama generated {} samples; x(1)={:.4}",
|
|
trajectory.time.len(),
|
|
trajectory.values.last().unwrap()[0]
|
|
);
|
|
}
|