rename order statistic variable
This commit is contained in:
parent
772d49043d
commit
c9713418b3
1 changed files with 5 additions and 5 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue