caelum0x 8af85c6e28 style: format workspace to rustfmt.toml (use_small_heuristics = Max)
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.
2026-08-18 16:59:40 +03:00

10 lines
466 B
Rust

use lawsynth_regime::{SegmentationConfig, pelt};
#[test]
fn segmentation_covers_input_without_gaps() {
let values: Vec<f64> = (0..30).map(|i| if i < 15 { 0.0 } else { 10.0 }).collect();
let result = pelt(&values, SegmentationConfig { penalty: 0.5, min_segment_len: 2 }).unwrap();
assert_eq!(result.segments.first().unwrap().start, 0);
assert_eq!(result.segments.last().unwrap().end, values.len());
assert_eq!(result.change_points(), vec![15]);
}