splitted simulate function from main

This commit is contained in:
2024-05-12 01:07:41 +02:00
parent 25d06948b4
commit 6b48a51be4

View File

@@ -15,12 +15,16 @@ mod plot;
const THREAD_CNT: usize = 8; const THREAD_CNT: usize = 8;
const SAMPLE_LIMIT: usize = 1_000_000_000; const SAMPLE_LIMIT: usize = 1_000_000_000;
const SUB_SAMPLES: [usize; 3] = [1, 2, 5]; const SUB_SAMPLES: [usize; 3] = [1, 2, 5];
const SAMPLES_PER_ITERATION: usize = 10; const SAMPLES_PER_ITERATION: usize = 1000;
fn main() { fn main() {
let bounds: Bounds = Bounds::new(LinearBounds::new(0_f64, 20_f64), LinearBounds::new(-100_f64, 150000_f64)); let bounds: Bounds = Bounds::new(LinearBounds::new(0_f64, 20_f64), LinearBounds::new(-100_f64, 150000_f64));
let func: Function = Function::new(); let func: Function = Function::new();
simulate(&bounds, &func)
}
fn simulate(bounds: &Bounds, func: &Function) {
let mut result: Plot = Plot::new(); let mut result: Plot = Plot::new();
let mut sample_cnt: usize = 1; let mut sample_cnt: usize = 1;