From c9713418b3fed696fd65eb762974288be32aec02 Mon Sep 17 00:00:00 2001 From: jacekpoz Date: Thu, 9 May 2024 11:18:06 +0200 Subject: [PATCH] rename order statistic variable --- lab3/zad3/src/main.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lab3/zad3/src/main.rs b/lab3/zad3/src/main.rs index a5d90b8..2dff42c 100644 --- a/lab3/zad3/src/main.rs +++ b/lab3/zad3/src/main.rs @@ -82,20 +82,20 @@ fn main() -> io::Result<()> { let mut select_7 = NormalSelect::new(false); let mut select_9 = NormalSelect::new(false); - let k = n as usize / 2; + let order_statistic = n as usize / 2; for _ in 0..m { _ = std::io::stdout().flush(); let time_3 = SystemTime::now(); - select_3.select_k(&input, k, 3); + select_3.select_k(&input, order_statistic, 3); let time_3 = time_3.elapsed().unwrap().as_millis(); let time_5 = SystemTime::now(); - select_5.select_k(&input, k, 5); + select_5.select_k(&input, order_statistic, 5); let time_5 = time_5.elapsed().unwrap().as_millis(); let time_7 = SystemTime::now(); - select_7.select_k(&input, k, 7); + select_7.select_k(&input, order_statistic, 7); let time_7 = time_7.elapsed().unwrap().as_millis(); let time_9 = SystemTime::now(); - select_9.select_k(&input, k, 9); + select_9.select_k(&input, order_statistic, 9); let time_9 = time_9.elapsed().unwrap().as_millis(); select_3_results_clone.get_mut(&n).unwrap().push((select_3.num_comp(), select_3.num_swap(), time_3));