From 6b48a51be4e86d4c8d3c16b9d2d7967cef999f12 Mon Sep 17 00:00:00 2001 From: Timo Schneider Date: Sun, 12 May 2024 01:07:41 +0200 Subject: [PATCH] splitted simulate function from main --- src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index fd034bc..7f10f9d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,12 +15,16 @@ mod plot; const THREAD_CNT: usize = 8; const SAMPLE_LIMIT: usize = 1_000_000_000; const SUB_SAMPLES: [usize; 3] = [1, 2, 5]; -const SAMPLES_PER_ITERATION: usize = 10; +const SAMPLES_PER_ITERATION: usize = 1000; fn main() { let bounds: Bounds = Bounds::new(LinearBounds::new(0_f64, 20_f64), LinearBounds::new(-100_f64, 150000_f64)); let func: Function = Function::new(); + simulate(&bounds, &func) +} + +fn simulate(bounds: &Bounds, func: &Function) { let mut result: Plot = Plot::new(); let mut sample_cnt: usize = 1;