rename order statistic variable

This commit is contained in:
jacekpoz 2024-05-09 11:18:06 +02:00
parent 772d49043d
commit c9713418b3
Signed by: poz
SSH key fingerprint: SHA256:JyLeVWE4bF3tDnFeUpUaJsPsNlJyBldDGV/dIKSLyN8

View file

@ -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));