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.
14 lines
484 B
Rust
14 lines
484 B
Rust
use lawsynth_differentiate::tvreg_series;
|
|
use std::{hint::black_box, time::Instant};
|
|
|
|
fn main() {
|
|
let time = (0..2_000).map(|i| i as f64 * 0.01).collect::<Vec<_>>();
|
|
let values = time.iter().map(|t| t.sin()).collect::<Vec<_>>();
|
|
let started = Instant::now();
|
|
let mut len = 0;
|
|
for _ in 0..100 {
|
|
len += black_box(tvreg_series(&time, &values, 0.05, 40).unwrap()).len();
|
|
}
|
|
println!("regularized {len} derivative samples in {:?}", started.elapsed());
|
|
}
|